Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2015 14:05:18 +0100
From:      Bertram Scharpf <>
Subject:   Re: adduser - gid error?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Friday, 04. Dec 2015, 03:04:55 -0800, Anton Shterenlikht wrote:
> For the user I added today I got:
> newuser:*:1004:4294967295: ...
> Does this look right?

4294967295 is obviously 0xffffffff in hexadecimal and -1 if
seen as a signed value what is commonly used in C as a
return value to indicate an error.

> pw: gid `4294967295' has already been allocated
> adduser: ERROR: There was an error adding user (newuser).

"adduser" is a shell script. I had a look at it but I don't
know how you managed to generate that number. The script
calls "pw", that is written in C and probably cannot
increment the maximum 32-bit value.

> What shall I do?

Untested: You should be save by editing /etc/groups and change
the value by hand. Then call "vipw" to edit /etc/passwd.
After that you need to find files on disk with the wrong
group id. You can do something like

  # find /home /var -group 4294967295 -exec ls -l '{}' \; 
  # find /home /var -group 4294967295 -exec chgrp 1004 '{}' \; 

Did I forget anything?

Good luck!


Bertram Scharpf
Stuttgart, Deutschland/Germany

Want to link to this message? Use this URL: <>