Comment 6 for bug 488158

Revision history for this message
ceg (ceg) wrote :

Hi,
what a nice coincidence. :) Thank you for your feedback. I have now updated the wiki to match the adduser behaviour as well.

I've seen now, that only useradd/groupadd is part of the debian passwd package, but adduser uses it.

> (But still, adduser could be smarter and remove the group if the user was the only member of it.)
Imagine the group of santaclauses. Around the end off the year different people get to be members therin. If the manually created group would get deleted with the last santa claus resigning in january, next year a newly created group would probably not get the same GID . Files provided in the /home/group/santaclauses would not be usable by the new group.

I don't know the problems GID != UID UPGs could make other then not being easily recognizable by humans, when seeing the numerical IDs in .tar files or mounts on other machines.

> users-admin has its own "algorithm" to find a good UID/GID
> ...
> If that really matters, I could remove this behavior so that we ask adduser to choose [the UID/GIDs]. This is generally a good idea, but may not be very high priority for me if it does not hurt.

Oh, well, that kind of behaviour however can actually hurt heavily, yes. (another tool has hit me with that) Especially in networked evironments you assign special UID/GID ranges to use (and configure the useradd/adduser hooks to take care of it). Now if me or some other admin of the institution switches the GUI tool and it starts choosing IDs of its own liking the tool can cause quite adverse effects. So if you can, please do not default to override the numerical IDs assigned by the system.

In all I am happy to hear users-admin is generally using the adduser tool, and it's only some avoidable overrides that are troublesome.

BTW: (for forwarding to the debian bug you linked)

the default from /etc/login.defs:
# This enables userdel to remove user groups if no members exist.
#
# Other former uses of this variable such as setting the umask when
# user==primary group are not used in PAM environments, thus in Debian
#
USERGROUPS_ENAB yes

In this case userdel should probaly also alter the "Warning: group
X is now empty." message to "According to USERGROUPS_ENAB yes, the empty private user group has been deleted as well." or somthing.