Cygwin – Your group is currently mkpasswd

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!

Advertisements

14 thoughts on “Cygwin – Your group is currently mkpasswd

  1. Fionn

    This would be better….

    mkpasswd -c >> /etc/passwd
    mkgroup -c >> /etc/passwd

    which is will append to the file, and not overwrite existing contents

  2. Phil

    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.

    1. 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)

      1. Phil

        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 :(

      2. Hi Phil, did you try running the setup with the following option:

        On Windows Vista and later, setup*.exe will check by default if it runs with administrative privileges and, if not, will try to elevate the process. If you want to avoid this behaviour and install under an unprivileged account just for your own usage, run setup*.exe with the --no-admin option.

        Source: https://cygwin.com/install.html

  3. Phil

    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

  4. Andreas

    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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s