3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
6 .\" Manual: File Formats and Conversions
7 .\" Source: File Formats and Conversions
10 .TH "LOGIN\&.DEFS" "5" "07/24/2009" "File Formats and Conversions" "File Formats and Conversions"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
16 .\" disable justification (adjust text to left margin only)
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
22 login.defs \- shadow password suite configuration
27 file defines the site\-specific configuration for the shadow password suite\&. This file is required\&. Absence of this file will not prevent system operation, but will probably result in undesirable operation\&.
29 This file is a readable text file, each line of the file describing one configuration parameter\&. The lines consist of a configuration name and value, separated by whitespace\&. Blank lines and comment lines are ignored\&. Comments are introduced with a "#" pound sign and the pound sign must be the first non\-white character of the line\&.
31 Parameter values may be of four types: strings, booleans, numbers, and long numbers\&. A string is comprised of any printable characters\&. A boolean should be either the value
34 \fIno\fR\&. An undefined boolean parameter or one with a value other than these will be given a
36 value\&. Numbers (both regular and long) may be either decimal values, octal values (precede the value with
37 \fI0\fR) or hexadecimal values (precede the value with
38 \fI0x\fR)\&. The maximum value of the regular and long numeric parameters is machine\-dependent\&.
40 The following configuration items are provided:
42 \fBCHFN_AUTH\fR (boolean)
47 program will require authentication before making any changes, unless run by the superuser\&.
50 \fBCHFN_RESTRICT\fR (string)
52 This parameter specifies which values in the
56 file may be changed by regular users using the
58 program\&. It can be any combination of letters
62 \fIh\fR, for Full name, Room number, Work phone, and Home phone, respectively\&. For backward compatibility,
69 \fIfrwh\fR\&. If not specified, only the superuser can make any changes\&. The most restrictive setting is better achieved by not installing
74 \fBCHSH_AUTH\fR (boolean)
79 program will require authentication before making any changes, unless run by the superuser\&.
82 \fBCONSOLE\fR (string)
84 If defined, either full pathname of a file containing device names (one per line) or a ":" delimited list of device names\&. Root logins will be allowed only upon these devices\&.
86 If not defined, root will be allowed on any device\&.
88 The device should be specified without the /dev/ prefix\&.
91 \fBCONSOLE_GROUPS\fR (string)
93 List of groups to add to the user\'s supplementary groups set when logging in on the console (as determined by the CONSOLE setting)\&. Default is none\&.
95 Use with caution \- it is possible for users to gain permanent access to these groups, even when not logged in on the console\&.
98 \fBCREATE_HOME\fR (boolean)
100 Indicate if a home directory should be created by default for new users\&.
102 This setting does not apply to system users, and can be overriden on the command line\&.
105 \fBDEFAULT_HOME\fR (boolean)
107 Indicate if login is allowed if we can\'t cd to the home directory\&. Default in no\&.
110 \fIyes\fR, the user will login in the root (/) directory if it is not possible to cd to her home directory\&.
113 \fBENCRYPT_METHOD\fR (string)
115 This defines the system default encryption algorithm for encrypting passwords (if no algorithm are specified on the command line)\&.
117 It can take one of these values:
165 Note: this parameter overrides the
170 \fBENV_HZ\fR (string)
172 If set, it will be used to define the HZ environment variable when a user login\&. The value must be preceded by
173 \fIHZ=\fR\&. A common value on Linux is
177 \fBENV_PATH\fR (string)
179 If set, it will be used to define the PATH environment variable when a regular user login\&. The value can be preceded by
180 \fIPATH=\fR, or a colon separated list of paths (for example
181 \fI/bin:/usr/bin\fR)\&. The default value is
182 \fIPATH=/bin:/usr/bin\fR\&.
185 \fBENV_SUPATH\fR (string)
187 If set, it will be used to define the PATH environment variable when the superuser login\&. The value can be preceded by
188 \fIPATH=\fR, or a colon separated list of paths (for example
189 \fI/sbin:/bin:/usr/sbin:/usr/bin\fR)\&. The default value is
190 \fIPATH=/bin:/usr/bin\fR\&.
193 \fBENV_TZ\fR (string)
195 If set, it will be used to define the TZ environment variable when a user login\&. The value can be the name of a timezone preceded by
198 \fITZ=CST6CDT\fR), or the full path to the file containing the timezone specification (for example
201 If a full path is specified but the file does not exist or cannot be read, the default is to use
205 \fBENVIRON_FILE\fR (string)
207 If this file exists and is readable, login environment will be read from it\&. Every line should be in the form name=value\&.
209 Lines starting with a # are treated as comment lines and ignored\&.
212 \fBERASECHAR\fR (number)
214 Terminal ERASE character (\fI010\fR
219 The value can be prefixed "0" for an octal value, or "0x" for an hexadecimal value\&.
222 \fBFAIL_DELAY\fR (number)
224 Delay in seconds before being allowed another attempt after a login failure\&.
227 \fBFAILLOG_ENAB\fR (boolean)
229 Enable logging and display of
231 login failure info\&.
234 \fBFAKE_SHELL\fR (string)
238 will execute this shell instead of the users\' shell specified in
242 \fBFTMP_FILE\fR (string)
244 If defined, login failures will be logged in this file in a utmp format\&.
247 \fBGID_MAX\fR (number), \fBGID_MIN\fR (number)
249 Range of group IDs used for the creation of regular groups by
255 \fBHUSHLOGIN_FILE\fR (string)
257 If defined, this file can inhibit all the usual chatter during the login sequence\&. If a full pathname is specified, then hushed mode will be enabled if the user\'s name or shell are found in the file\&. If not a full pathname, then hushed mode will be enabled if the file exists in the user\'s home directory\&.
260 \fBISSUE_FILE\fR (string)
262 If defined, this file will be displayed before each login prompt\&.
265 \fBKILLCHAR\fR (number)
267 Terminal KILL character (\fI025\fR
270 The value can be prefixed "0" for an octal value, or "0x" for an hexadecimal value\&.
273 \fBLASTLOG_ENAB\fR (boolean)
275 Enable logging and display of /var/log/lastlog login time info\&.
278 \fBLOG_OK_LOGINS\fR (boolean)
280 Enable logging of successful logins\&.
283 \fBLOG_UNKFAIL_ENAB\fR (boolean)
285 Enable display of unknown usernames when login failures are recorded\&.
287 Note: logging unknown usernames may be a security issue if an user enter her password instead of her login name\&.
290 \fBLOGIN_RETRIES\fR (number)
292 Maximum number of login retries in case of bad password\&.
295 \fBLOGIN_STRING\fR (string)
297 The string used for prompting a password\&. The default is to use "Password: ", or a translation of that string\&. If you set this variable, the prompt will no be translated\&.
299 If the string contains
300 \fI%s\fR, this will be replaced by the user\'s name\&.
303 \fBLOGIN_TIMEOUT\fR (number)
305 Max time in seconds for login\&.
308 \fBMAIL_CHECK_ENAB\fR (boolean)
310 Enable checking and display of mailbox status upon login\&.
312 You should disable it if the shell startup files already check for mail ("mailx \-e" or equivalent)\&.
315 \fBMAIL_DIR\fR (string)
317 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\&.
320 \fBMAIL_FILE\fR (string)
322 Defines the location of the users mail spool files relatively to their home directory\&.
329 variables are used by
333 to create, move, or delete the user\'s mail spool\&.
336 \fBMAIL_CHECK_ENAB\fR
338 \fIyes\fR, they are also used to define the
340 environment variable\&.
342 \fBMAX_MEMBERS_PER_GROUP\fR (number)
344 Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
346 (with the same name, same password, and same GID)\&.
348 The default value is 0, meaning that there are no limits in the number of members in a group\&.
350 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\&.
352 If you need to enforce such limit, you can use 25\&.
354 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\&.
357 \fBMD5_CRYPT_ENAB\fR (boolean)
359 Indicate if passwords must be encrypted using the MD5\-based algorithm\&. If set to
360 \fIyes\fR, new passwords will be encrypted using the MD5\-based algorithm compatible with the one used by recent releases of FreeBSD\&. It supports passwords of unlimited length and longer salt strings\&. Set to
362 if you need to copy encrypted passwords to other systems which don\'t understand the new algorithm\&. Default is
365 This variable is superceded by the
367 variable or by any command line option used to configure the encryption algorithm\&.
369 This variable is deprecated\&. You should use
370 \fBENCRYPT_METHOD\fR\&.
373 \fBMOTD_FILE\fR (string)
375 If defined, ":" delimited list of "message of the day" files to be displayed upon login\&.
378 \fBNOLOGINS_FILE\fR (string)
380 If defined, name of file whose presence will inhibit non\-root logins\&. The contents of this file should be a message indicating why logins are inhibited\&.
383 \fBOBSCURE_CHECKS_ENAB\fR (boolean)
385 Enable additional checks upon password changes\&.
388 \fBPASS_ALWAYS_WARN\fR (boolean)
390 Warn about weak passwords (but still allow them) if you are root\&.
393 \fBPASS_CHANGE_TRIES\fR (number)
395 Maximum number of attempts to change password if rejected (too easy)\&.
398 \fBPASS_MAX_DAYS\fR (number)
400 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)\&.
403 \fBPASS_MIN_DAYS\fR (number)
405 The minimum number of days allowed between password changes\&. Any password changes attempted sooner than this will be rejected\&. If not specified, \-1 will be assumed (which disables the restriction)\&.
408 \fBPASS_WARN_AGE\fR (number)
410 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\&.
418 are only used at the time of account creation\&. Any changes to these settings won\'t affect existing accounts\&.
420 \fBPASS_MAX_LEN\fR (number), \fBPASS_MIN_LEN\fR (number)
422 Number of significant characters in the password for crypt()\&.
424 is 8 by default\&. Don\'t change unless your crypt() is better\&. This is ignored if
430 \fBPORTTIME_CHECKS_ENAB\fR (boolean)
432 Enable checking of time restrictions specified in /etc/porttime\&.
435 \fBQUOTAS_ENAB\fR (boolean)
437 Enable setting of ulimit, umask, and niceness from passwd gecos field\&.
440 \fBSHA_CRYPT_MIN_ROUNDS\fR (number), \fBSHA_CRYPT_MAX_ROUNDS\fR (number)
447 \fISHA512\fR, this defines the number of SHA rounds used by the encryption algorithm by default (when the number of rounds is not specified on the command line)\&.
449 With a lot of rounds, it is more difficult to brute forcing the password\&. But note also that more CPU resources will be needed to authenticate users\&.
451 If not specified, the libc will choose the default number of rounds (5000)\&.
453 The values must be inside the 1000\-999999999 range\&.
456 \fBSHA_CRYPT_MIN_ROUNDS\fR
458 \fBSHA_CRYPT_MAX_ROUNDS\fR
459 values is set, then this value will be used\&.
462 \fBSHA_CRYPT_MIN_ROUNDS\fR
464 \fBSHA_CRYPT_MAX_ROUNDS\fR, the highest value will be used\&.
467 \fBSULOG_FILE\fR (string)
469 If defined, all su activity is logged to this file\&.
472 \fBSU_NAME\fR (string)
474 If defined, the command name to display when running "su \-"\&. For example, if this is defined as "su" then a "ps" will display the command is "\-su"\&. If not defined, then "ps" would display the name of the shell actually being run, e\&.g\&. something like "\-sh"\&.
477 \fBSU_WHEEL_ONLY\fR (boolean)
480 \fIyes\fR, the user must be listed as a member of the first gid 0 group in
484 on most Linux systems) to be able to
486 to uid 0 accounts\&. If the group doesn\'t exist or is empty, no one will be able to
491 \fBSYS_GID_MAX\fR (number), \fBSYS_GID_MIN\fR (number)
493 Range of group IDs used for the creation of system groups by
499 \fBSYS_UID_MAX\fR (number), \fBSYS_UID_MIN\fR (number)
501 Range of user IDs used for the creation of system users by
507 \fBSYSLOG_SG_ENAB\fR (boolean)
509 Enable "syslog" logging of
514 \fBSYSLOG_SU_ENAB\fR (boolean)
516 Enable "syslog" logging of
518 activity \- in addition to sulog file logging\&.
521 \fBTTYGROUP\fR (string), \fBTTYPERM\fR (string)
523 The terminal permissions: the login tty will be owned by the
525 group, and the permissions will be set to
528 By default, the ownership of the terminal is set to the user\'s primary group and the permissions are set to
533 can be either the name of a group or a numeric group identifier\&.
537 program which is "setgid" to a special group which owns the terminals, define TTYGROUP to the group number and TTYPERM to 0620\&. Otherwise leave TTYGROUP commented out and assign TTYPERM to either 622 or 600\&.
540 \fBTTYTYPE_FILE\fR (string)
542 If defined, file which maps tty line to TERM environment parameter\&. Each line of the file is in a format something like "vt100 tty01"\&.
545 \fBUID_MAX\fR (number), \fBUID_MIN\fR (number)
547 Range of user IDs used for the creation of regular users by
553 \fBULIMIT\fR (number)
562 The file mode creation mask is initialized to this value\&. If not specified, the mask will be initialized to 022\&.
568 use this mask to set the mode of the home directory they create
572 to define users\' initial umask\&. Note that this mask can be overriden by the user\'s GECOS line (if
574 is set) or by the specification of a limit with the
580 \fBUSERDEL_CMD\fR (string)
582 If defined, this command is run when removing a user\&. It should remove any at/cron/print jobs etc\&. owned by the user to be removed (passed as the first argument)\&.
584 The return code of the script is not taken into account\&.
586 Here is an example script, which removes the user\'s cron, at and print jobs:
594 # Check for the required argument\&.
596 echo "Usage: $0 username"
600 # Remove cron jobs\&.
604 # Note that it will remove any jobs owned by the same UID,
605 # even if it was shared by a different username\&.
606 AT_SPOOL_DIR=/var/spool/cron/atjobs
607 find $AT_SPOOL_DIR \-name "[^\&.]*" \-type f \-user $1 \-delete \e;
609 # Remove print jobs\&.
622 \fBUSERGROUPS_ENAB\fR (boolean)
624 Enable setting of the umask group bits to be the same as owner bits (examples: 022 \-> 002, 077 \-> 007) for non\-root users, if the uid is the same as gid, and username is the same as the primary group name\&.
629 will remove the user\'s group if it contains no more members, and
631 will create by default a group with the name of the user\&.
633 .SH "CROSS REFERENCES"
635 The following cross references show which programs in the shadow password suite use which parameters\&.
647 ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB
648 SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS
653 ENCRYPT_METHOD MD5_CRYPT_ENAB
654 SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS
659 CHSH_AUTH LOGIN_STRING
664 ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB
665 SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS
670 GID_MAX GID_MIN MAX_MEMBERS_PER_GROUP SYS_GID_MAX SYS_GID_MIN
675 MAX_MEMBERS_PER_GROUP
680 MAX_MEMBERS_PER_GROUP
685 MAX_MEMBERS_PER_GROUP
690 MAX_MEMBERS_PER_GROUP
695 MAX_MEMBERS_PER_GROUP
700 MAX_MEMBERS_PER_GROUP
707 CONSOLE_GROUPS DEFAULT_HOME
708 ENV_HZ ENV_PATH ENV_SUPATH ENV_TZ ENVIRON_FILE
719 LOGIN_TIMEOUT LOG_OK_LOGINS LOG_UNKFAIL_ENAB
720 MAIL_CHECK_ENAB MAIL_DIR MAIL_FILE MOTD_FILE NOLOGINS_FILE PORTTIME_CHECKS_ENAB QUOTAS_ENAB
721 TTYGROUP TTYPERM TTYTYPE_FILE
733 ENCRYPT_METHOD GID_MAX GID_MIN MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE
734 SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS
735 SYS_GID_MAX SYS_GID_MIN SYS_UID_MAX SYS_UID_MIN UID_MAX UID_MIN UMASK
740 ENCRYPT_METHOD MD5_CRYPT_ENAB OBSCURE_CHECKS_ENAB PASS_ALWAYS_WARN PASS_CHANGE_TRIES PASS_MAX_LEN PASS_MIN_LEN
741 SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS
746 PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE
751 PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE
758 CONSOLE_GROUPS DEFAULT_HOME
761 ENV_TZ LOGIN_STRING MAIL_CHECK_ENAB MAIL_DIR MAIL_FILE QUOTAS_ENAB
776 CREATE_HOME GID_MAX GID_MIN MAIL_DIR MAX_MEMBERS_PER_GROUP PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE SYS_GID_MAX SYS_GID_MIN SYS_UID_MAX SYS_UID_MIN UID_MAX UID_MIN UMASK
781 MAIL_DIR MAIL_FILE MAX_MEMBERS_PER_GROUP USERDEL_CMD USERGROUPS_ENAB
786 MAIL_DIR MAIL_FILE MAX_MEMBERS_PER_GROUP