[Pkg-shadow-devel] useradd creates a group with a dupligated GID

Nicolas François nicolas.francois at centraliens.net
Sun Mar 21 01:15:06 UTC 2010


Hello,

On Mon, Jan 25, 2010 at 12:07:39AM +0100, lambda512 at gmail.com wrote:
> 
> I'm using shadow 4.1.4.2 in Archlinux
> 
> When I run:
> # useradd -r -u 400 -G daemon -d /srv/svn svn
> 
> It adds the folowing line to /etc/passwd
> svn:x:400:99::/srv/svn:/bin/bash
> 
> and 
> svn:x:99:
> to /etc/groups The problem is that there already exists a nobody group with 
> GID 99
> 
> I guess that to create a group with a duplicated GID is a bug, so I shoudl 
> report it.

You can fix it locally by defining SYS_GID_MIN and SYS_GID_MAX in your
login.defs

With your configuration, you have
	SYS_GID_MIN = 101
	SYS_GID_MAX = GID_MIN -1 v= 99 < SYS_GID_MIN

I will change useradd so that it fails instead of reusing a GID in this
case.

Best Regards,
-- 
Ǹekral



More information about the Pkg-shadow-devel mailing list