Subject: Re: Adding a users group to /etc/group
To: None <>
From: Simon Burge <>
List: tech-userlevel
Date: 10/01/2000 16:55:48
[ time to open old wounds! ]

On May 2 2000, David Brownlee wrote:

> On Tue, 2 May 2000, Alistair G. Crooks wrote:
> > in basesrc/usr.sbin/user/Makefile, there's a target called
> > default-group, which is carefully organised to make the default
> > group for you, should it not exist.
> > 
> > If the default group doesn't exist, it starts at 99 and goes down
> > by 1, trying to find an unused group. If that is exhausted, it then
> > goes up from 101, trying to allocate a gid, and stopping at 60000,
> > when it calls it a day.
> > 
> > The reason for doing this was so that the default group would not
> > be tied into a numeric value for existing sites, and so that it
> > could be dynamically allocated, and just work.
> > 
> > I'm not too happy with having a value in /etc/group, but can see
> > that it's necessary for new hosts. However, I also believe that
> > functionality is provided by the "default-target" in
> > basesrc/usr.sbin/user/Makefile.
>         If I understand correctly that we would add
>                 'cd usr.sbin/user ; make default-group'
>         to the end of the 'make distribution' target in etc/Makefile?
>         While that target is a very flexible method of ensuring the
>         'users' group could be added to any arbitrary group file, it
>         does seem to make the process of finding out what /etc/group
>         will contain from a source tree rather opaque.

This is no different to hard coding a value in /usr/src/etc/group
anyway.  All "make distribution" does it copy the source file directly
into /etc...

The problem I see is that we are shipping the usermgmt tools as part
of the base OS for the first time for 1.5, and the default group for
useradd is "users".  On an upgrade, someone is not likely to have a
group called "users" and when they go to use useradd - boom.

What if the default group for the usermgmt tools was changed to "guest"
instead?  The other option is to fall back to "guest" if "users" doesn't

Simon Burge                            <>
NetBSD Sales, Support and Service: