Adding a local user under Cygwin

Suppose we want to add Gromit [password: passw0rd] as a Cygwin user.
Issue the following commands on the console:

$ net user Gromit passw0rd /add /yes
$ mkpasswd -l -u Gromit >> /etc/passwd

The first line adds a new user under NT.
In the second line we’re appending the user password to the existing list of passwords. Now, create a directory in /home for the new user:

/home/Gromit

…and make Cygwin aware of the new user.

Note that the user won’t be able to login until NT has a place to store his/her profile. For this, either login as that new user (on local machine), or issue a command to create a directory

<sysDir>\Documents and Settings\Gromit

…and we should be done!


Reference taken from here

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.