X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <476F6105.46D5419F@dessent.net>
Date: Sun, 23 Dec 2007 23:34:30 -0800
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Struggling to setup sshd with Windows Vista
References: <96c450350712230222s3549d224m75974cd082bf71a3@mail.gmail.com> 	 <96c450350712230448q14dc0ac3s34e85de08d9b6e9f@mail.gmail.com> <96c450350712231207g36bcc392w38c92bf52a52802c@mail.gmail.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
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

Kevin Hilton wrote:

> Let me just make sure I know what you are telling me to do, since I
> already did this and it didnt make a difference.  As an administrator,
> I:
> 1. Delete the sshd user -- Ok I manually edited the /etc/passwd file
> and deleted this user

No, I mean delete the *user*, not a line in a passwd file.  Windows has
a notion of user accounts, Cygwin does not; it just mirrors the Windows
database in the passwd and group file.  So deleting a user means doing
it in Windows, through the control panel, or with "net user".

On 2k3 and greater (including Vista) ssh-host-config should have created
both a sshd (for privsep) and a sshd_server user (for running the
service), so you'd want to run "net user sshd /delete" and "net user
sshd_server /delete".  You can run "net user" to see the list of Windows
user accounts.  If you don't see these user accounts it means the
ssh-host-config script wasn't able to create them, which is probably the
underlying cause.

The reason for suggesting to delete these users is that ssh-host-config
won't recreate them if they already exist, so if they exist and are
setup wrong, ssh-host-config can't help you.

> /var/log/sshd.log reveals:
> $ more sshd.log
> Privilege separation user sshd does not exist
> 
> So how do I create the sshd user? Is there anything I am missing??
> This is my first time running into problems.  Ive repeated this
> process on XP boxes like 20 times without incidence.  Its even easier
> on Ubuntu.  However getting this up and running on Vista is a fiasco.

Again, you shouldn't have to do anything other than run the
ssh-host-config script.  It is over 600 lines of logic and meant to take
care of everything required for any version of Windows.  There is no
manual fiddling needed.

I have a Vista test system.  I just ran "ssh-host-config -y" and it
worked perfectly, so I don't see what this "fiasco" you talk about is.

If you use UAC you you need to run Cygwin as an administrator when
running ssh-host-config otherwise it will be unable to do a lot of the
steps required.  You can do that simply by right clicking on the Cygwin
icon and choosing "Run as administrator".  Or disable UAC.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

