Bug#295416: [Pkg-shadow-devel] Bug#295416: Deleting a user group in userdel should only be done if the group is empty

Christian Perrier Christian Perrier <bubulle@debian.org>, 295416@bugs.debian.org
Sun, 1 May 2005 08:10:01 +0200


tags 295416 upstream
retitle 295416 userdel should not remove the user's primary group is it has other members
thanks


> Probably we should consider the following functional
> split between adduser/deluser (i.e. high-level) and
> useradd/userdel (low-level) tools:

The most important split, imho, is that useradd/userdel and other
low-level utilities are potentially shared among several Unices and
Linux distros.

So, as Marc mentioned, care should be taken to keep them behave
consistently among these.

For me, this forbids us (Debian maintainers) to patch them in any way
to make their behaviour different in Debian.

But, we should also remember that we work with upstream, so we're
likely to influence a change in the design.

>   I mean that useradd/userdell should only preserve
>   integrity of /etc/passwd, shadow, group, gshadow and
>   other most necessary files.


I mostly agree here. 


> The same I state in bug #264879, although rather
> implicitly.
> 
> P.S. please, keep in mind that bug #295416 is not about
> deleting group which has other members in it.
> The bug is about userdel removing group which is
> _primary_ for someone else (not having other _members_).


Not exactly. This is about userdel *always* deleting the primary group
of the user it deletes, no matter whether this group is used by
another user.

>From your statement above ("userdel should guarantee the integrity of
system files"), such behaviour should *not* happen. userdel should
only delete the primary group of the user *only* if it has no other
members.

So, in my opinion, this bug is still an upstream bug. An I tag it
accordingly (which I forgot to do, though it is marked as "forwarded")

I also give it a better title.