This message occurs every time you start your freshly installed Cygwin when you’re logged in as a domain user.
Your group is currently "mkpasswd". This indicates that your gid is not in /etc/group and your uid is not in /etc/passwd. The /etc/passwd (and possibly /etc/group) files should be rebuilt. See the man pages for mkpasswd and mkgroup then, for example, run mkpasswd -l [-d] >> /etc/passwd mkgroup -l [-d] >> /etc/group Note that the -d switch is necessary for domain users.
Important: You need to install Cygwin with the user you are logged in with.
Tip: Remove the word “setup” from the cygwin executable to be able to install it without administrator privileges. (e.g. setup-x64.exe should be renamed to cygwin-x64.exe)
- mkpasswd -l only shows my local users, and not the domain user I’m logged in with, so that does not solve this.
- mkpasswd -l -d get an enormous amount of users because it tries to replicate my whole organisation, which is not necessary.
We just need our current user ( mkpasswd -c ) to be sent to the /etc/passwd and /etc/group files, to do this, we use this command:
Solution:
mkpasswd -c >> /etc/passwd mkgroup -c >> /etc/group
After that, our current account is added to both /etc/passwd and /etc/group and the annoying greeting message is gone!
Thanks. You helped me solve my problem. But for me I had to use the command without -c.
I think you need the > in the mkgroup.. as in mkgroup -c > /etc/passwd
This would be better….
mkpasswd -c >> /etc/passwd
mkgroup -c >> /etc/passwd
which is will append to the file, and not overwrite existing contents
typo from copy& paste, 2nd line should be
mkgroup -c >> /etc/group
Thanks Fionn, you’re right! I’ve updated the post.
Thank you!!
myusername@computername ~
$ mkpasswd -c >> /etc/passwd
-sh: /etc/passwd: Permission denied
myusername@computername ~
$ mkpasswd -c >> /etc/group
-sh: /etc/group: Permission denied
Hmm, any idea? My account is not an administrator on the machine, I assume this has something to do with it? I had to install Cygwin using a temporary admin account, but this is not one I can log on with all the time. I couldn’t re-run setup with my own username after removing “setup” from the installer’s filename, I still got prompted by Windows UAC.
Hi Phil,
I’ve had that problem too. It is because you’ve installed cygwin with another user. You should install cygwin as your current user, then you have the correct rights set up on the cygwin install folders. Make sure you install cygwin in a directory you’ve created yourself, this way you know for sure you’re the owner and you’re able to create all the files. You should not need any admin rights for the installation of cygwin, nor for the tip described above.
If it asks you for admin rights, please copy the cygwin install file to plain “cygwin.exe” and make sure the word “setup” is not in there (and voila, suddenly you don’t need admin rights)
Thanks Joris,
Unfortunately I just can’t get the setup to run without admin rights. I’ve tried copying the file then renaming and running the copy, and I’ve tried renaming it before making a copying, but no luck with either 🙁
Hi Phil, did you try running the setup with the following option:
Source: https://cygwin.com/install.html
Brilliant, thanks for your advice about the –no-admin option! Got it running, had some problems installing, but ended up working fine after using a different mirror 🙂
Phil
Thanks for that post.
It’s also possible to solve the problem, if cygwin was installed by admin.
At first start cygwin as normal user and enter
mkpasswd -c
mkgroup -c
Then open another cygwin terminal with administrator account by using “right-click” -> “Run as administrator” in start menu.
Then use
echo foo >> /etc/passwd
echo foo >> /etc/group
Where “foo” stands for the output, which was printed in cygwin terminal of the user.
That’s a good tip, thanks Andreas!
Thank you so much!!!! This worked for me!