[Pkg-shadow-devel] Bug#282184: More information needed for this bug

Vincent Lefevre vincent at vinc17.org
Wed Sep 28 09:35:31 UTC 2005


On 2005-09-28 07:21:22 +0200, Christian Perrier wrote:
> ("addgroup should not refuse adding groups that already exist with the
> same name in an external database such as NIS")

You could possibly add the following condition: the gid is the same one.

> > > I see no real problem in this. Which behaviour are you actually
> > > expecting?
> > 
> > The group should be created in the local database, as the user
> > requested it.
> 
> Uh.
> 
> I'm damn sure this is not a so good idea. For instance high level
> utilities such as  adduser will probably at some moment include
> support for external databases such as LDAP (or NIS...if someone is
> still using this). I really wonder how they could behave in the case
> two groups with the same name exist in both database:
> 
> addgroup toto spaces
> 
> -->in which of the two "spaces" group should toto be added?

The database that has the precedence to look for the "spaces" gid is
given by the nsswitch.conf file; in general, it is /etc/group.

> So, in short, I think that passwd utilities are right using the getent
> calls to get the list of what exists and what doesn't.

I don't think so. getent may use remote databases, whereas groupadd
is purely local (according to the man page).

And some packages use it to create local groups.

-- 
Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA




More information about the Pkg-shadow-devel mailing list