I don't care about security.
I do not need these "user accounts" to be visible to Windows' mechanisms.
Every Cygwin user must have a corresponding Windows user.
How do I add a new user in Cygwin?
- Create a Windows User
- Create the user in Windows (Start > Control Panel >Manage User Accounts > Add...)
- Create the corresponding Cygwin user
Run the following commands:
mkpasswd -l > /etc/passwd
mkgroup -l > /etc/group
This will synchronise the Cygwin users and group with the Windows user account.
If you are in a Domain use -d instead of -l
- Set the users shell
Change the user's default shell as appropriate by modifying /etc/passwd (which is a plain text file
The format of the file is as follows:
Username:Password:UID:GID:Info:Home:Shell
- Modify the user home directory permissions as appropriate for your needs
I don't know how to set "no password required"
If you really don't care about security and want no password use:
password -p username
From the passwd documentation:
Synopsis
passwd [OPTION] [USER]
Options
...
-p, --pwd-not-required no password required for USER.
Source passwd
Am I fighting with recent "improvements"?
From Cygwin version 1.7.34 onward /etc/passwd is no longer used by default to manage user accounts.
If /etc/passwd exists it will be used, but only to cater to existing installs and special situations.
If /etc/passwd doesn't exist you can still create it. See mkpasswd and mkgroup for more information.
Since version 1.7.34 Cygwin uses uses native Windows user management.
- Active Directory if it is available,
- SAM otherwise.
You should use the new mechanism to manage user accounts instead of /etc/passwd:
Starting with Cygwin 1.7.34, Cygwin uses an automatic, internal
translation from Windows SID to POSIX UID/GID. This mechanism, which
is the preferred method for the SID<=>UID/GID mapping, is described in
detail in the Mapping Windows accounts to POSIX accounts.
Prior to Cygwin 1.7.34, the last part of the SID, the so called
"Relative IDentifier" (RID), was by default used as UID and/or GID
when you created the /etc/passwd and /etc/group files using the
mkpasswd and mkgroup tools. These tools as well as reading
accounts from /etc/passwd and /etc/group files is still present in
recent versions of Cygwin, but you should switch to the aforementioned
automatic translation, unless you have very specific needs. Again, see
Mapping Windows accounts to POSIX accountsfor the details.
Source POSIX accounts, permission, and security:
su gives command not found.
Install sshd and use ssh username@localhost as a su replacement.
You can define a su alias to make this easier.
Why doesn't su work?
The su command has been in and out of Cygwin distributions, but it has not been ported to Cygwin and has
never worked. It is currently installed as part of the sh-utils, but
again, it does not work.
You should rather install sshd and use ssh username@localhost as a
su replacement.
For some technical background into why su doesn't work, read About
the 'su'
command and
related mail archive messages.
Source Why doesn't su work?