When you first install cygwin and run bash, it’ll usually display this error message:

Your group is currently "mkpasswd".  This indicates that
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.

If you happen to be in a corporate environment with a huge active directory, then the mkpasswd(1) command can take a very long time. A quicker way to fix this issue (provided only the current user uses cygwin on this machine, which is most likely) is to issue this command instead:

mkpasswd -l -c > /etc/passwd; mkgroup -l -d > /etc/group

The mkgroup(1) command will still take a few minutes to complete, but typically there are much fewer groups than users, so it’s bearable.

8 Comments

  1. mkpasswd -l -c > /etc/passwd; mkgroup -l -d > /etc/passwd

    Fehler: copy paste bei mkgroup es muß natürlich
    /etc/group heißen nicht /etc/passwd

    Es handelt sich also um ungetesteter code. Bitte nicht
    benutzen.

    Gruß

    Dietmar.

  2. If you arent Domain user and use Cygwin only localy
    the right way is:

    mkpasswd -l -p /home/ -c > /etc/passwd
    mkgroup -l -c > /etc/group

    use the -p option otherwise you will find your home
    in the deep stack of shit within windows. Nothing will
    work again and your children will cry.

  3. Thanks Feherfind, now I know why ssh(1) was trying to go off to my Windows home instead of $HOME

  4. You might want to direct output from mkgroup to /etc/group rather than /etc/passwd…

  5. Indeed! Thank’s Josh, updated

  6. Thanks very much, everyone — I was considering giving up!

  7. hi all

    I ran the following command after updating cyqwin

    mkpasswd -l -p /home/ -c > /etc/passwd
    mkgroup -l -c > /etc/group

    The problem now is that I cannot access shared libraries for NS2 simulator in different users settings how can i solve this I need different ns versions on different users
    Thanks

  8. Thanks so much for posting this, I had been searching forever and unable to fix this problem until I found this site.


2 Trackbacks/Pingbacks

  1. [...] If you arent Domain user and use Cygwin only localy the right way is: mkpasswd -l -p /home/ -c > /etc/passwd mkgroup -l -c > /etc/group use the -p option otherwise you will find your home in the deep stack of shit within windows. Solution from [...]

  2. [...] I tried doing what the documentation but I still kept getting that message.  I then tried one of the suggestions in the comments of this post, Cygwin users and groups « sinewalker. [...]

Post a Comment

*
*