21 January 2012

Cygwin SSH server: adding Windows accounts

If your Windows server needs SSH, the Cygwin set of tools does a great job of combining the GNU tools on a Windows platform.  Download and install Cygwin and install the SSH Server; once you have that installed you're going to want your local users to have SSH access.


This pulls Windows accounts and adds the account info to Cygwin:
$ mkpasswd -cl |grep $USERNAME >> /etc/passwd

This sets up Windows groups on Cygwin (they may already be there):
$ mkgroup --local |grep $GROUPNAME >> /etc/group

Note that you may need to edit your /etc/passwd file for a new home directory, default group membership, or other such info that would be contained in the /etc/passwd file.

0 comments: