This is the mail archive of the
mailing list for the Cygwin project.
Re: Adding users to /etc/passwd for ssh purposes, but not as a local Windows user
- From: Keith Christian <keithchristian at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 25 Jul 2006 06:21:59 -0700 (PDT)
- Subject: Re: Adding users to /etc/passwd for ssh purposes, but not as a local Windows user
--- Corinna Vinschen <email@example.com> wrote:
> On Jul 24 19:09, Keith Christian wrote:
> > Suppose a Windows 2000/XP/2003 machine exists where three accounts need to
> > added for use only with SSH to a Unix/Linux machine, for ssh/scp/sftp use.
> > Further suppose these user accounts are to be named ssh_user_a,
> > and ssh_user_c, and that these should exist only in Cygwin's /etc/passwd
> > - they won't be added as local Windows users.
> Nope. Every account in /etc/passwd needs a real account in Windows,
> given as SID in the pw_gecos field. Cygwin has no own user management
> but relies on Windows' user management.
> What you can do is to create (or choose an existing) single account in
> Windows, create three entries for this user in /etc/passwd, edit
> /etc/passwd to give these three accounts different names and different
> Cygwin uids, but let them all still refer to this single Windows
> account. And then expect weirdnesses. For instance, the files created
> by any of these accounts will of course be owned by the underlying
> Windows account. An `ls -l' will always show the files being owned by
> the user entry showing up first in /etc/passwd. They are simply only
> one account actually, whatever you fake in /etc/passwd.
Thanks for the explanation. Last evening, the sequence below allowed the
creation of an alternate user. Assume "kchristian" as an existing Windows
user and "keith" as the new Cygwin user.
1. As superuser: vi /etc/passwd
2. Duplicate an existing Windows user (in my case, "kchristian" user via
2. Change the UID from X to X+1: :s/X/X+1/g
3. mkdir /home/keith
4. chmod -R keith:None /home/keith
5. passwd keith
6. Assuming SSHD is running, log in to the new Cygwin user account with "ssh
Steps 1-6 worked without problems.
The only thing remaining is to get the authorized_keys settings just right so
that I can perform SSH passwordless logins between Cygwin and Linux. I've
done this before but so far SSH is still asking for a password. (Probably a
permission issue in ~/.ssh or files within it.)
The Cygwin team is doing an excellent job with the product. Cygwin is so good
that I can avoid an impressive amount of "interface GUI-dom."
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html