X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:references
	:mime-version:content-type:content-transfer-encoding
	:in-reply-to; q=dns; s=default; b=g0qU2mLPzg9fBbSVwvIg0+gZvQLJhb
	1KM1bzlnrc4MoSiNK2dpwWSkt7GoSShj0oLAIX1CsjR6vKiQHBhCIznTSfaTMy9L
	kZNMX3BFfi++LDgcOQUm3x7wH+Y8ky1kv+x1E5iUf40R5ktRWSVrMGtl5VGdGmvp
	pQ4+gjLgM59rs=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:references
	:mime-version:content-type:content-transfer-encoding
	:in-reply-to; s=default; bh=q1fE5mrq8FRevHHSHv2Nzxor3cw=; b=tIcZ
	imP67yFML+bu6Ll2NiojQiKzO9R60/15dC9Z48rb8iZS3/7sJj7kM4bQETJjMm6U
	GugmJOlDDYefDgT+9XNu7nRI2XZrpjlGsjfAeDuU8mSlFhZTidUnnM9BtOnQW1ZU
	RXH2EJVGgkuoAyX7cZRCWn+nVOBjQZYN16+/CI4=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=H*r:Unknown, privileged, Administrator, State
X-HELO: blaine.gmane.org
To: cygwin@cygwin.com
From: Chris Wilson <chwilso3@cisco.com>
Subject: Re: Cygwin sshd doesn't use domain user names on boot up
Date: Thu, 7 Dec 2017 16:16:46 -0800
Lines: 69
Message-ID: <67d32ed9-cc36-026c-48dd-730b63417f9b@cisco.com>
References: <40190877-370C-45C1-9D35-50B88A67AA4A@cisco.com> <6a47b6c6-032a-37d0-fe56-2ae21e6a5a68@SystematicSw.ab.ca>
Mime-Version: 1.0
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
In-Reply-To: <6a47b6c6-032a-37d0-fe56-2ae21e6a5a68@SystematicSw.ab.ca>
X-IsSubscribed: yes

On 12/5/17 12:17 PM, Brian Inglis wrote:

> Did you install the service by running ssh-host-config?

Yes.

FYI, I had to run ssh-host-config as a domain user.  When I first ran it 
as a local Administrator, the ssh-host-config script printed the following:

*** Info: User 'cyg_server' has been created with password '<redacted>'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'cyg_server' account.

passwd: unknown user cyg_server
*** Warning: Setting password expiry for user 'cyg_server' failed!
*** Warning: Please check that password never expires or set it to your 
needs.
*** Warning: Expected privileged user 'cyg_server' does not exist.
*** Warning: Defaulting to 'SYSTEM'

*** Info: The sshd service has been installed under the LocalSystem
*** Info: account (also known as SYSTEM). To start the service now, call
*** Info: `net start sshd' or `cygrunsrv -S sshd'.  Otherwise, it
*** Info: will start automatically after the next reboot.

> Check service dependencies with:
> $ cygrunsrv -VQ sshd
> Service             : sshd
> Display name        : CYGWIN sshd
> Current State       : Running
> Controls Accepted   : Stop, Preshutdown
> Command             : /usr/sbin/sshd -D
> stdin path          : /dev/null
> stdout path         : /var/log/sshd.log
> stderr path         : /var/log/sshd.log
> Process Type        : Own Process
> Startup             : Manual
> Dependencies        : cygserver, tcpip
> Account             : .\cyg_server 

$ cygrunsrv -VQ sshd
Service             : sshd
Display name        : CYGWIN sshd
Current State       : Running
Controls Accepted   : Stop
Command             : /usr/sbin/sshd -D
stdin path          : /dev/null
stdout path         : /var/log/sshd.log
stderr path         : /var/log/sshd.log
Environment         : CYGWIN="ntsec"
Process Type        : Own Process
Startup             : Automatic
Account             : .\cyg_server

> You may have to add an additional dependency on netlogon or other AD services to
> ensure they are available before sshd starts.

I tried adding netlogon as a dependency to sshd, but didn't see any 
change in behavior.

> If your service start is Automatic, you may also want to change it manually to
> Automatic (delayed start), to allow time for network services to be available.

Changing it from "Automatic" to "Automatic (delayed start)" fixed the 
issue.  This is my first time messing with Windows services and didn't 
see this option initially.

Thanks for the suggestion Brian!


--
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

