Le 12/02/2020 à 13:16, Eli Schwartz a écrit :
On 2/12/20 6:07 AM, Didier Kryn wrote:
FYI, there has been for decades an adduser in Debian which is higher
level than useradd in the sense that it is a helper for admin. It
enforces local policy and can be used to change it: minimum userid,
default group, etc.
Strange.
Local policy via useradd is configured in /etc/login.defs
If USERGROUPS_ENAB is defined as "yes", useradd will by default create a
new group for each user, and add them to the group, and if it is defined
as "no", then the GROUP setting in /etc/default/useradd (falling back to
100 by default) will be used as the GID which will be the newly created
user's primary group.
The minimum and maximum UID/GID pool is defined via this conf block:
#
# Min/max values for automatic uid selection in useradd
#
UID_MIN 1000
UID_MAX 60000
# System accounts
SYS_UID_MIN 500
SYS_UID_MAX 999
#
# Min/max values for automatic gid selection in groupadd
#
GID_MIN 1000
GID_MAX 60000
# System accounts
SYS_GID_MIN 500
SYS_GID_MAX 999
...
I'm not sure what additional utility "adduser" would bring, given this
is all already configurable.
Well, I think there are more things configurable with adduser. And,
by default, it enforces Debian policy. It always has been a problem for
me to remember how it works and I always preferred useradd. And even
using a hand-made script to implement my own defaults.
Didier
Didier
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox