The file defines variables grouped into sections. Each section starts with a section header:
The lines following a section header define variables from that section:
A variable can have more than one value, specified by using more than one line defining that variable. All currently defined variables accept only the first value and ignore the others, if any.
Possible values are des, md5, blowfish, sha256 and sha512, all case-insensitive. Unrecognized values are treated as des. Default value is des.
If only one of the above variables is specified, the number of rounds used is specified by the other variable. If neither variable is specified, the number of rounds is chosen by libc.
The following variables are imported:
Variable | Imported as |
ENCRYPT_METHOD | |
GID_MIN | groupdefaults/LU_GIDNUMBER |
MAIL_DIR | defaults/mailspooldir |
MD5_CRYPT_ENAB | defaults/crypt_style |
PASS_MAX_DAYS | userdefaults/LU_SHADOWMAX |
PASS_MIN_DAYS | userdefaults/LU_SHADOWMIN |
PASS_WARN_AGE | userdefaults/LU_SHADOWWARNING |
SHA_CRYPT_MIN_ROUNDS | defaults/hash_rounds_min |
SHA_CRYPT_MAX_ROUNDS | defaults/hash_rounds_max |
UID_MIN | userdefaults/LU_UIDNUMBER |
The following variables are not imported: CREATE_HOME, GID_MAX, MAIL_FILE, SYSLOG_SG_ENAB, UID_MAX, UMASK, USERDEL_CMD, USERGROUPS_ENAB
The following variables are imported:
Variable | Imported as |
EXPIRE | |
GROUP | userdefaults/LU_GIDNUMBER |
HOME | userdefaults/LU_HOMEDIRECTORY |
INACTIVE | userdefaults/LU_SHADOWINACTIVE |
SHELL | userdefaults/LU_LOGINSHELL |
SKEL | defaults/skeleton |
The HOME variable value has /%n appended to it before importing.
All other variables have the same names as the attribute names from <libuser/entity.h> and define attribute values. Either the macro name (e.g. LU_GECOS) or the macro content (e.g. pw_gecos) can be used; if both are used, the one appearing later in the configuration file is used.
The % character in the value of the variable introduces an escape sequence: %n is replaced by the user name, %d is replaced by current date in days since the epoch, %u is replaced by the user's UID. There is no way to escape the % character and avoid this substitution.
After the userdefaults section is processed, modules may define additional attributes or even override the attributes defined in this section.
The other variables follow the same rules as in the userdefaults section, except that %n and %u are replaced by the group name and group's GID, respectively.
After the groupdefaults section is processed, modules may define additional attributes or even override the attributes defined in this section.