From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30146 invoked by alias); 11 Mar 2016 12:39:39 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 30127 invoked by uid 89); 11 Mar 2016 12:39:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: Yes, score=6.6 required=5.0 tests=AWL,BAYES_60,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,UNSUBSCRIBE_BODY autolearn=no version=3.3.2 spammy=baker, Baker, intercepted, virus-free X-HELO: mail1.bemta5.messagelabs.com Received: from mail1.bemta5.messagelabs.com (HELO mail1.bemta5.messagelabs.com) (195.245.231.142) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 11 Mar 2016 12:39:36 +0000 Received: from [85.158.136.83] by server-6.bemta-5.messagelabs.com id 29/6D-06623-48CB2E65; Fri, 11 Mar 2016 12:39:32 +0000 X-Env-Sender: Nick.Battle@uk.fujitsu.com X-Msg-Ref: server-10.tower-36.messagelabs.com!1457699972!22153031!1 X-StarScan-Received: X-StarScan-Version: 8.11; banners=uk.fujitsu.com,-,- X-VirusChecked: Checked Received: (qmail 14331 invoked from network); 11 Mar 2016 12:39:32 -0000 Received: from unknown (HELO mailhost4.uk.fujitsu.com) (62.60.8.85) by server-10.tower-36.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 11 Mar 2016 12:39:32 -0000 Received: from R01UKEXCASM115.r01.fujitsu.local (ex2k13_115.fs.fujitsu.com [10.183.43.171]) by mailhost4.uk.fujitsu.com (8.14.5/8.14.5) with ESMTP id u2BCYIbK014521 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL) for ; Fri, 11 Mar 2016 12:34:18 GMT Received: from R01UKEXCASM112.r01.fujitsu.local (10.183.43.168) by R01UKEXCASM115.r01.fujitsu.local (10.183.43.171) with Microsoft SMTP Server (TLS) id 15.0.1076.9; Fri, 11 Mar 2016 12:39:31 +0000 Received: from R01UKEXCASM112.r01.fujitsu.local ([fe80::ec7c:5e01:3273:c085]) by R01UKEXCASM112.r01.fujitsu.local ([fe80::ec7c:5e01:3273:c085%23]) with mapi id 15.00.1076.000; Fri, 11 Mar 2016 12:39:31 +0000 From: "Nick.Battle@uk.fujitsu.com" To: "cygwin@cygwin.com" Subject: Problem with ssh-host-config? Date: Fri, 11 Mar 2016 12:39:00 -0000 Message-ID: <869e15d0ccf54bd5ac85e8896f61592e@R01UKEXCASM112.r01.fujitsu.local> x-ms-exchange-transport-fromentityheader: Hosted Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2016-03/txt/msg00154.txt.bz2 I'm having a strange problem with the sshd configuration script on Windows = 8. I'm calling it as follows, where I expect both the fjsupport Windows use= r account and /etc/passwd entry to be created by the script: /bin/ssh-host-config -y -c ntsec -u fjsupport -w If the user has no entry in /etc/passwd, it creates the Windows account, bu= t then complains when it comes to create the sshd service that the privileg= ed user does not exist (I think it means in /etc/passwd). If I add the user= to /etc/passwd (using mkpasswd after the first run) and just remove the Wi= ndows account, then it sees that the user exists in /etc/passwd and does no= t attempt to create a Windows account, then complaining that it cannot use = the (non-existent) Windows user when it tries to create the service. If I h= ave both the Windows account (with privileges) and the /etc/passwd entry be= forehand, everything is fine, but of course it doesn't have to make either. By stepping through the script (incidentally, the -d flag doesn't work prop= erly?), I found that the csih_create_privileged_user function is using the = variable ${username} to write to /etc/passwd. But when called as above this= variable is not set. So that doesn't update /etc/passwd and it (later) thi= nks the user is not known. This is at line 3069 in cygwin-service-installat= ion-helper.sh. /usr/bin/mkpasswd -l -u "${username}" >> "${SYSCONFDIR}/passwd" Changing ${username} to ${csih_PRIVILEGED_USERNAME} seems to fix the proble= m and everything works as expected. So I have the result I want, but I'm not sure that the fix above is correct= . Isn't it normal to use ssh-host-config to create the user in Windows and = /etc/passwd? In which case why isn't everyone getting this problem? Or am I= using the script the wrong way? --=20 Cheers, -nick Unless otherwise stated, this email has been sent from Fujitsu Services Lim= ited, from Fujitsu (FTS) Limited, or from Fujitsu Telecommunications Europe= Limited, together "Fujitsu". This email is only for the use of its intended recipient. Its contents are= subject to a duty of confidence and may be privileged. Fujitsu does not g= uarantee that this email has not been intercepted and amended or that it is= virus-free. Fujitsu Services Limited, registered in England No 96056, registered office= 22 Baker Street, London W1U 3BW. Fujitsu (FTS) Limited, registered in England No 03808613, registered office= 22 Baker Street, London W1U 3BW. PFU Imaging Solutions Europe Limited, registered in England No 1578652, reg= istered office Hayes Park Central, Hayes End Road, Hayes, Middlesex, UB4 8F= E. Fujitsu Telecommunications Europe Limited, registered in England No 2548187= , registered office Solihull Parkway, Birmingham Business Park, Birmingham,= B37 7YU. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple