Getting shadow into shape

Matthew Burgess matthew at linuxfromscratch.org
Wed Mar 7 13:47:44 PST 2007


On Wednesday 07 March 2007 01:26, Bryan Kadzban wrote:

> In fact GROUP won't be used at all, ever, in any configuration; the only
> way with vanilla shadow-4.0.18.1 to get all your users in the same GID
> is to provide that GID to the -g option.

Thanks for the detailed analysis, Bryan.  Aside from the lack of documentation 
of this change, there appears to be one bug outstanding which is that 
get_defaults() (useradd.c: 253-357) still wants to validate the GROUP= line.  
With the default of 1000 this leads to the familiar:

useradd: unknown GID 1000

This is particularly frustrating as useradd(8) then goes on to create a group 
with GID 1000!

I've attached an updated patch that I think removes all of the GROUP handling, 
and my initial testing suggests it works as I'd expect.  Note that the final 
version of the patch will need to patch man/useradd.8 too, as the man pages 
don't get regenerated by default (and such regeneration wouldn't work in 
chapter 6 anyway as it depends on docbook-xsl et al).

If folks could test this patch out I'd be grateful.  I'll pass it upstream 
once folks confirm it doesn't break anything.

Thanks,

Matt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shadow-4.0.18.1-useradd-2.patch
Type: text/x-diff
Size: 5512 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-dev/attachments/20070307/8a251aac/attachment.patch>


More information about the lfs-dev mailing list