The following configuration variables in /etc/login.defs change
the behavior of this tool:
CREATE_HOME
(boolean)
Indicate if a home directory should be created by default for
new users.
This setting does not apply to system users, and can be
overridden on the command line.
GID_MAX
(number), GID_MIN
(number)
Range of group IDs used for the creation of regular groups by
useradd
, groupadd
, or newusers
.
The default value for GID_MIN
(resp. GID_MAX
) is 1000 (resp.
60000).
HOME_MODE
(number)
The mode for new home directories. If not specified, the
UMASK
is used to create the mode.
useradd
and newusers
use this to set the mode of the home
directory they create.
LASTLOG_UID_MAX
(number)
Highest user ID number for which the lastlog entries should
be updated. As higher user IDs are usually tracked by remote
user identity and authentication services there is no need to
create a huge sparse lastlog file for them.
No LASTLOG_UID_MAX
option present in the configuration means
that there is no user ID limit for writing lastlog entries.
MAIL_DIR
(string)
The mail spool directory. This is needed to manipulate the
mailbox when its corresponding user account is modified or
deleted. If not specified, a compile-time default is used.
MAIL_FILE
(string)
Defines the location of the users mail spool files relatively
to their home directory.
The MAIL_DIR
and MAIL_FILE
variables are used by useradd
,
usermod
, and userdel
to create, move, or delete the user's mail
spool.
MAX_MEMBERS_PER_GROUP
(number)
Maximum members per group entry. When the maximum is reached,
a new group entry (line) is started in /etc/group (with the
same name, same password, and same GID).
The default value is 0, meaning that there are no limits in
the number of members in a group.
This feature (split group) permits to limit the length of
lines in the group file. This is useful to make sure that
lines for NIS groups are not larger than 1024 characters.
If you need to enforce such limit, you can use 25.
Note: split groups may not be supported by all tools (even in
the Shadow toolsuite). You should not use this variable
unless you really need it.
PASS_MAX_DAYS
(number)
The maximum number of days a password may be used. If the
password is older than this, a password change will be
forced. If not specified, -1 will be assumed (which disables
the restriction).
PASS_MIN_DAYS
(number)
The minimum number of days allowed between password changes.
Any password changes attempted sooner than this will be
rejected. If not specified, 0 will be assumed (which disables
the restriction).
PASS_WARN_AGE
(number)
The number of days warning given before a password expires. A
zero means warning is given only upon the day of expiration,
a negative value means no warning is given. If not specified,
no warning will be provided.
SUB_GID_MIN
(number), SUB_GID_MAX
(number), SUB_GID_COUNT
(number)
If /etc/subuid exists, the commands useradd
and newusers
(unless the user already have subordinate group IDs) allocate
SUB_GID_COUNT
unused group IDs from the range SUB_GID_MIN
to
SUB_GID_MAX
for each new user.
The default values for SUB_GID_MIN
, SUB_GID_MAX
,
SUB_GID_COUNT
are respectively 100000, 600100000 and 65536.
SUB_UID_MIN
(number), SUB_UID_MAX
(number), SUB_UID_COUNT
(number)
If /etc/subuid exists, the commands useradd
and newusers
(unless the user already have subordinate user IDs) allocate
SUB_UID_COUNT
unused user IDs from the range SUB_UID_MIN
to
SUB_UID_MAX
for each new user.
The default values for SUB_UID_MIN
, SUB_UID_MAX
,
SUB_UID_COUNT
are respectively 100000, 600100000 and 65536.
SYS_GID_MAX
(number), SYS_GID_MIN
(number)
Range of group IDs used for the creation of system groups by
useradd
, groupadd
, or newusers
.
The default value for SYS_GID_MIN
(resp. SYS_GID_MAX
) is 101
(resp. GID_MIN
-1).
SYS_UID_MAX
(number), SYS_UID_MIN
(number)
Range of user IDs used for the creation of system users by
useradd
or newusers
.
The default value for SYS_UID_MIN
(resp. SYS_UID_MAX
) is 101
(resp. UID_MIN
-1).
UID_MAX
(number), UID_MIN
(number)
Range of user IDs used for the creation of regular users by
useradd
or newusers
.
The default value for UID_MIN
(resp. UID_MAX
) is 1000 (resp.
60000).
UMASK
(number)
The file mode creation mask is initialized to this value. If
not specified, the mask will be initialized to 022.
useradd
and newusers
use this mask to set the mode of the
home directory they create if HOME_MODE
is not set.
It is also used by pam_umask
as the default umask value.
USERGROUPS_ENAB
(boolean)
If set to yes, userdel
will remove the user's group if it
contains no more members, and useradd
will create by default
a group with the name of the user.