❑ /etc/login.defs : This mainly stores the configure values used when creating user and group.
* Useradd command references /etc/login.defs and /etc/default/useradd(Link) when creates an user account.
❑ The contents of login.defs
Configure | Description |
MAIL_DIR /var/spool/mail | The path of the mailbox. |
PASS_MAX_DAYS 99999 | Maximum password age. |
PASS_MIN_DAYS 0 | Minimum password age. |
PASS_MIN_LEN 5 | Minimum password length. |
PASS_WARN_AGE 7 | Warning period before expiration. |
UID_MIN 1000 | Minimum UID value. |
UID_MAX 60000 | Minimum UID value. |
GID_MIN 1000 | Minimum GID value. |
GID_MAX 60000 | Maximum GID value. |
SYS_UID_MIN 201 | Minimum system UID value. |
SYS_UID_MAX 999 | Maximum system UID value. |
SYS_GID_MIN 201 | Minimum system GID value. |
SYS_GID_MAX 999 | Maximum system GID value. |
USERDEL_CMD /usr/sbin/userdel_local | The path to the command used to remove the user account. If the system has /usr/sbin/userdel, it doesn't need to be set. |
CREATE_HOME yes | yes : When the useradd command is used, the home directory is automatically created even if the -m option is not used. |
UMASK 077 | The umask value that is applied to the home directory. |
USERGROUPS_ENAB yes | - yes : When a user is created, a group with the same name is created, and the created user uses this group.
* This is called UPG schema.
- no : The created user is set to the GID as the GROUP specified in /etc/default/useradd.
|
ENCRYPT_METHOD SHA512 | Algorithm settings for encrypting account passwords. DES, MD5, Blowfish, SHA-256, SHA-512 are available. |