'\" t .\" Title: login.defs .\" Author: Julianne Frances Haugh .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 02/07/2020 .\" Manual: Форматы файлов .\" Source: shadow-utils 4.8.1 .\" Language: Russian .\" .TH "login\&.defs" "5" "02/07/2020" "shadow\-utils 4\&.8\&.1" "Форматы файлов" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "НАЗВАНИЕ" login.defs \- содержит конфигурацию подсистемы теневых паролей .SH "ОПИСАНИЕ" .PP The /etc/login\&.defs 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\&. .PP Файл представляет собой обычный текстовый файл; каждая строка описывает один параметр настройки\&. Строки состоят из названия параметра и его значения, которые разделяются пробельным символом\&. Пустые строки и комментарии игнорируются\&. Комментарии начинаются со знака фунта \(Fo#\(Fc, который должен быть первым непробельным символом в строке\&. .PP 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 \fIyes\fR or \fIno\fR\&. An undefined boolean parameter or one with a value other than these will be given a \fIno\fR value\&. Numbers (both regular and long) may be either decimal values, octal values (precede the value with \fI0\fR) or hexadecimal values (precede the value with \fI0x\fR)\&. The maximum value of the regular and long numeric parameters is machine\-dependent\&. .PP Возможны следующие параметры настройки: .PP \fBCHFN_RESTRICT\fR (string) .RS 4 This parameter specifies which values in the \fIgecos\fR field of the /etc/passwd file may be changed by regular users using the \fBchfn\fR program\&. It can be any combination of letters \fIf\fR, \fIr\fR, \fIw\fR, \fIh\fR, for Full name, Room number, Work phone, and Home phone, respectively\&. For backward compatibility, \fIyes\fR is equivalent to \fIrwh\fR and \fIno\fR is equivalent to \fIfrwh\fR\&. If not specified, only the superuser can make any changes\&. The most restrictive setting is better achieved by not installing \fBchfn\fR SUID\&. .RE .PP \fBCONSOLE_GROUPS\fR (string) .RS 4 List of groups to add to the user\*(Aqs supplementary groups set when logging in on the console (as determined by the CONSOLE setting)\&. Default is none\&. Use with caution \- it is possible for users to gain permanent access to these groups, even when not logged in on the console\&. .RE .PP \fBCREATE_HOME\fR (boolean) .RS 4 Определяет, должен ли создаваться по умолчанию домашний каталог для новых пользователей\&. .sp Эта переменная не влияет на системных пользователей и может быть переопределена из командной строки\&. .RE .PP \fBDEFAULT_HOME\fR (boolean) .RS 4 Определяет, можно ли войти в систему, если нельзя выполнить cd в домашний каталог\&. По умолчанию \(Fono\(Fc\&. .sp If set to \fIyes\fR, the user will login in the root (/) directory if it is not possible to cd to her home directory\&. .RE .PP \fBENCRYPT_METHOD\fR (string) .RS 4 Задаёт системный алгоритм шифрования по умолчанию для шифрования паролей (используется, если алгоритм не указан в командной строке)\&. .sp It can take one of these values: \fIDES\fR (default), \fIMD5\fR, \fISHA256\fR, \fISHA512\fR\&. .sp Note: this parameter overrides the \fBMD5_CRYPT_ENAB\fR variable\&. .sp Замечание: действует только при генерации паролей к группам\&. Генерация пользовательских паролей выполняется PAM и там же настраивается\&. Рекомендуется устанавливать значение этой переменной согласно настройкам PAM\&. .RE .PP \fBENV_HZ\fR (string) .RS 4 If set, it will be used to define the HZ environment variable when a user login\&. The value must be preceded by \fIHZ=\fR\&. A common value on Linux is \fIHZ=100\fR\&. .sp The \fBHZ\fR environment variable is only set when the user (the superuser) logs in with \fBsulogin\fR\&. .RE .PP \fBENV_PATH\fR (string) .RS 4 If set, it will be used to define the PATH environment variable when a regular user login\&. The value is a colon separated list of paths (for example \fI/bin:/usr/bin\fR) and can be preceded by \fIPATH=\fR\&. The default value is \fIPATH=/bin:/usr/bin\fR\&. .RE .PP \fBENV_SUPATH\fR (string) .RS 4 If set, it will be used to define the PATH environment variable when the superuser login\&. The value is a colon separated list of paths (for example \fI/sbin:/bin:/usr/sbin:/usr/bin\fR) and can be preceded by \fIPATH=\fR\&. The default value is \fIPATH=/sbin:/bin:/usr/sbin:/usr/bin\fR\&. .RE .PP \fBERASECHAR\fR (number) .RS 4 Terminal ERASE character (\fI010\fR = backspace, \fI0177\fR = DEL)\&. .sp Значение может начинаться с \(Fo0\(Fc при указании значения в восьмеричной системе счисления или \(Fo0x\(Fc при указании значения в шестнадцатеричной системе счисления\&. .RE .PP \fBFAIL_DELAY\fR (number) .RS 4 Задержка в секундах перед повторной попыткой после неудачного входа\&. .RE .PP \fBFAKE_SHELL\fR (string) .RS 4 If set, \fBlogin\fR will execute this shell instead of the users\*(Aq shell specified in /etc/passwd\&. .RE .PP \fBGID_MAX\fR (number), \fBGID_MIN\fR (number) .RS 4 Range of group IDs used for the creation of regular groups by \fBuseradd\fR, \fBgroupadd\fR, or \fBnewusers\fR\&. .sp The default value for \fBGID_MIN\fR (resp\&. \fBGID_MAX\fR) is 1000 (resp\&. 60000)\&. .RE .PP \fBHOME_MODE\fR (number) .RS 4 The mode for new home directories\&. If not specified, the \fBUMASK\fR is used to create the mode\&. .sp \fBuseradd\fR and \fBnewusers\fR use this to set the mode of the home directory they create\&. .RE .PP \fBHUSHLOGIN_FILE\fR (string) .RS 4 Если определена, то этот файл может заблокировать все обычные переговоры (chatter) при входе\&. Если указан полный путь к файлу, то будет включён сокращённый (hushed) режим, если в этом файле указано имя пользователя или оболочка\&. Если указан не полный путь, то будет включён сокращённый (hushed) режим, если файл находится в домашнем каталоге пользователя\&. .RE .PP \fBKILLCHAR\fR (number) .RS 4 Terminal KILL character (\fI025\fR = CTRL/U)\&. .sp Значение может начинаться с \(Fo0\(Fc при указании значения в восьмеричной системе счисления или \(Fo0x\(Fc при указании значения в шестнадцатеричной системе счисления\&. .RE .PP \fBLASTLOG_UID_MAX\fR (number) .RS 4 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\&. .sp No \fBLASTLOG_UID_MAX\fR option present in the configuration means that there is no user ID limit for writing lastlog entries\&. .RE .PP \fBLOG_OK_LOGINS\fR (boolean) .RS 4 Включить протоколирование успешных входов\&. .RE .PP \fBLOG_UNKFAIL_ENAB\fR (boolean) .RS 4 Включить показ неизвестных имён пользователей при записи неудачных попыток входа\&. .sp Замечание: протоколирование неизвестных имён пользователя может привести к проблемам с безопасностью, если пользователь введёт свой пароль вместо своего имени\&. .RE .PP \fBLOGIN_RETRIES\fR (number) .RS 4 Максимальное количество попыток входа при вводе неверного пароля\&. .sp Наиболее вероятно это значение будет переопределено PAM, так как по умолчанию в модуле pam_unix определено 3 попытки\&. Однако, это значение является резервом, если вы используете модуль аутентификации, который не учитывает PAM_MAXTRIES\&. .RE .PP \fBLOGIN_TIMEOUT\fR (number) .RS 4 Максимальное время в секундах, отведённое на вход\&. .RE .PP \fBMAIL_DIR\fR (string) .RS 4 Почтовый каталог\&. Данный параметр нужен для управления почтовым ящиком при изменении или удалении учётной записи пользователя\&. Если параметр не задан, то используется значение указанное при сборке\&. .RE .PP \fBMAIL_FILE\fR (string) .RS 4 Определяет расположение почтовых файлов пользователя относительно домашнего каталога\&. .RE .PP The \fBMAIL_DIR\fR and \fBMAIL_FILE\fR variables are used by \fBuseradd\fR, \fBusermod\fR, and \fBuserdel\fR to create, move, or delete the user\*(Aqs mail spool\&. .PP \fBMAX_MEMBERS_PER_GROUP\fR (number) .RS 4 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)\&. .sp Значение по умолчанию равно 0, означающее, что ограничения на количество членов в группе нет\&. .sp Данная возможность (разделение группы) позволяет ограничить длину строк в файле групп\&. Это полезно для ограничения длины строк групп NIS в 1024 символа\&. .sp Если вам нужно такое ограничение, укажите значение 25\&. .sp Замечание: разделение групп поддерживается не всеми инструментами (даже в наборе инструментов Shadow)\&. Вы не должны использовать эту переменную, если вам действительно это ненужно\&. .RE .PP \fBMD5_CRYPT_ENAB\fR (boolean) .RS 4 Indicate if passwords must be encrypted using the MD5\-based algorithm\&. If set to \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 \fIno\fR if you need to copy encrypted passwords to other systems which don\*(Aqt understand the new algorithm\&. Default is \fIno\fR\&. .sp This variable is superseded by the \fBENCRYPT_METHOD\fR variable or by any command line option used to configure the encryption algorithm\&. .sp This variable is deprecated\&. You should use \fBENCRYPT_METHOD\fR\&. .sp Замечание: действует только при генерации паролей к группам\&. Генерация пользовательских паролей выполняется PAM и там же настраивается\&. Рекомендуется устанавливать значение этой переменной согласно настройкам PAM\&. .RE .PP \fBPASS_MAX_DAYS\fR (number) .RS 4 Максимальное число дней использования пароля\&. Если пароль старее этого числа, то будет запущена процедура смены пароля\&. Если значение не задано, то предполагается значение \-1 (то есть возможность ограничения не используется)\&. .RE .PP \fBPASS_MIN_DAYS\fR (number) .RS 4 Максимальное число дней между изменениями пароля\&. Любая смена пароля ранее заданного срока выполнена не будет\&. Если значение не задано, то предполагается значение \-1 (то есть возможность ограничения не используется)\&. .RE .PP \fBPASS_WARN_AGE\fR (number) .RS 4 Число дней за которое начнёт выдаваться предупреждение об устаревании пароля\&. Нулевое значение означает, что предупреждение выдаётся в день устаревания, при отрицательном значении предупреждение выдаваться не будет\&. Если значение не задано, выдача предупреждения отключается\&. .RE .PP \fBPASS_MAX_DAYS\fR, \fBPASS_MIN_DAYS\fR and \fBPASS_WARN_AGE\fR are only used at the time of account creation\&. Any changes to these settings won\*(Aqt affect existing accounts\&. .PP \fBSHA_CRYPT_MIN_ROUNDS\fR (number), \fBSHA_CRYPT_MAX_ROUNDS\fR (number) .RS 4 When \fBENCRYPT_METHOD\fR is set to \fISHA256\fR or \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)\&. .sp Увеличение количества раундов повышает сложность подбора пароля простым перебором\&. Но заметим, что при этом для аутентификации пользователей требуется большее количество процессорных ресурсов\&. .sp Если не задана, то libc выбирает значение количества раундов по умолчанию (5000)\&. .sp Значения должны лежать в диапазоне 1000\-999999999\&. .sp If only one of the \fBSHA_CRYPT_MIN_ROUNDS\fR or \fBSHA_CRYPT_MAX_ROUNDS\fR values is set, then this value will be used\&. .sp If \fBSHA_CRYPT_MIN_ROUNDS\fR > \fBSHA_CRYPT_MAX_ROUNDS\fR, the highest value will be used\&. .sp Замечание: действует только при генерации паролей к группам\&. Генерация пользовательских паролей выполняется PAM и там же настраивается\&. Рекомендуется устанавливать значение этой переменной согласно настройкам PAM\&. .RE .PP \fBSULOG_FILE\fR (string) .RS 4 Если определена, то любая активность su будет протоколироваться в этот файл\&. .RE .PP \fBSU_NAME\fR (string) .RS 4 Если определена, то выводится имя команды когда работает \(Fosu \-\(Fc\&. Например, если значение равно \(Fosu\(Fc, то \(Fops\(Fc покажет команду как \(Fo\-su\(Fc\&. Если не определена, то \(Fops\(Fc покажет имя запускаемой оболочки например как \(Fo\-sh\(Fc\&. .RE .PP \fBSUB_GID_MIN\fR (number), \fBSUB_GID_MAX\fR (number), \fBSUB_GID_COUNT\fR (number) .RS 4 If /etc/subuid exists, the commands \fBuseradd\fR and \fBnewusers\fR (unless the user already have subordinate group IDs) allocate \fBSUB_GID_COUNT\fR unused group IDs from the range \fBSUB_GID_MIN\fR to \fBSUB_GID_MAX\fR for each new user\&. .sp The default values for \fBSUB_GID_MIN\fR, \fBSUB_GID_MAX\fR, \fBSUB_GID_COUNT\fR are respectively 100000, 600100000 and 65536\&. .RE .PP \fBSUB_UID_MIN\fR (number), \fBSUB_UID_MAX\fR (number), \fBSUB_UID_COUNT\fR (number) .RS 4 If /etc/subuid exists, the commands \fBuseradd\fR and \fBnewusers\fR (unless the user already have subordinate user IDs) allocate \fBSUB_UID_COUNT\fR unused user IDs from the range \fBSUB_UID_MIN\fR to \fBSUB_UID_MAX\fR for each new user\&. .sp The default values for \fBSUB_UID_MIN\fR, \fBSUB_UID_MAX\fR, \fBSUB_UID_COUNT\fR are respectively 100000, 600100000 and 65536\&. .RE .PP \fBSYS_GID_MAX\fR (number), \fBSYS_GID_MIN\fR (number) .RS 4 Range of group IDs used for the creation of system groups by \fBuseradd\fR, \fBgroupadd\fR, or \fBnewusers\fR\&. .sp The default value for \fBSYS_GID_MIN\fR (resp\&. \fBSYS_GID_MAX\fR) is 101 (resp\&. \fBGID_MIN\fR\-1)\&. .RE .PP \fBSYS_UID_MAX\fR (number), \fBSYS_UID_MIN\fR (number) .RS 4 Range of user IDs used for the creation of system users by \fBuseradd\fR or \fBnewusers\fR\&. .sp The default value for \fBSYS_UID_MIN\fR (resp\&. \fBSYS_UID_MAX\fR) is 101 (resp\&. \fBUID_MIN\fR\-1)\&. .RE .PP \fBSYSLOG_SG_ENAB\fR (boolean) .RS 4 Enable "syslog" logging of \fBsg\fR activity\&. .RE .PP \fBSYSLOG_SU_ENAB\fR (boolean) .RS 4 Enable "syslog" logging of \fBsu\fR activity \- in addition to sulog file logging\&. .RE .PP \fBTTYGROUP\fR (string), \fBTTYPERM\fR (string) .RS 4 The terminal permissions: the login tty will be owned by the \fBTTYGROUP\fR group, and the permissions will be set to \fBTTYPERM\fR\&. .sp By default, the ownership of the terminal is set to the user\*(Aqs primary group and the permissions are set to \fI0600\fR\&. .sp \fBTTYGROUP\fR can be either the name of a group or a numeric group identifier\&. .sp If you have a \fBwrite\fR 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\&. .RE .PP \fBTTYTYPE_FILE\fR (string) .RS 4 Если определена, то в ней указывается имя файла, в котором описано соответствие между линией tty и параметром окружения TERM\&. Каждая строка файла имеет формат вида \(Fovt100 tty01\(Fc\&. .RE .PP \fBUID_MAX\fR (number), \fBUID_MIN\fR (number) .RS 4 Range of user IDs used for the creation of regular users by \fBuseradd\fR or \fBnewusers\fR\&. .sp The default value for \fBUID_MIN\fR (resp\&. \fBUID_MAX\fR) is 1000 (resp\&. 60000)\&. .RE .PP \fBUMASK\fR (number) .RS 4 Задаёт начальное значение маски доступа для создаваемых файлов\&. Если не указано, то маска устанавливается в 022\&. .sp \fBuseradd\fR and \fBnewusers\fR use this mask to set the mode of the home directory they create if \fBHOME_MODE\fR is not set\&. .sp It is also used by \fBpam_umask\fR as the default umask value\&. .RE .PP \fBUSERDEL_CMD\fR (string) .RS 4 Определяет программу, которая будет запущена при удалении пользователя\&. Она должна удалять любые задания at/cron/печати удаляемого пользователя (передаётся в качестве первого аргумента)\&. .sp Возвращаемый сценарием код завершения не учитывается\&. .sp Here is an example script, which removes the user\*(Aqs cron, at and print jobs: .sp .if n \{\ .RS 4 .\} .nf #! /bin/sh # Check for the required argument\&. if [ $# != 1 ]; then echo "Usage: $0 username" exit 1 fi # Remove cron jobs\&. crontab \-r \-u $1 # Remove at jobs\&. # Note that it will remove any jobs owned by the same UID, # even if it was shared by a different username\&. AT_SPOOL_DIR=/var/spool/cron/atjobs find $AT_SPOOL_DIR \-name "[^\&.]*" \-type f \-user $1 \-delete \e; # Remove print jobs\&. lprm $1 # All done\&. exit 0 .fi .if n \{\ .RE .\} .sp .RE .PP \fBUSERGROUPS_ENAB\fR (boolean) .RS 4 If set to \fIyes\fR, \fBuserdel\fR will remove the user\*(Aqs group if it contains no more members, and \fBuseradd\fR will create by default a group with the name of the user\&. .RE .SH "ПЕРЕКРЁСТНЫЕ ССЫЛКИ" .PP Следующие перекрёстные ссылки отражают связь между программами и их параметрам из набора для работы с теневыми паролями\&. .PP chfn .RS 4 CHFN_RESTRICT .RE .PP chgpasswd .RS 4 ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS .RE .PP chpasswd .RS 4 SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS .RE .PP gpasswd .RS 4 ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS .RE .PP groupadd .RS 4 GID_MAX GID_MIN MAX_MEMBERS_PER_GROUP SYS_GID_MAX SYS_GID_MIN .RE .PP groupdel .RS 4 MAX_MEMBERS_PER_GROUP .RE .PP groupmems .RS 4 MAX_MEMBERS_PER_GROUP .RE .PP groupmod .RS 4 MAX_MEMBERS_PER_GROUP .RE .PP grpck .RS 4 MAX_MEMBERS_PER_GROUP .RE .PP grpconv .RS 4 MAX_MEMBERS_PER_GROUP .RE .PP grpunconv .RS 4 MAX_MEMBERS_PER_GROUP .RE .PP lastlog .RS 4 LASTLOG_UID_MAX .RE .PP login .RS 4 CONSOLE_GROUPS DEFAULT_HOME ERASECHAR FAIL_DELAY FAKE_SHELL HUSHLOGIN_FILE KILLCHAR LOGIN_RETRIES LOGIN_TIMEOUT LOG_OK_LOGINS LOG_UNKFAIL_ENAB TTYGROUP TTYPERM TTYTYPE_FILE USERGROUPS_ENAB .RE .PP newgrp / sg .RS 4 SYSLOG_SG_ENAB .RE .PP newusers .RS 4 ENCRYPT_METHOD GID_MAX GID_MIN MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB HOME_MODE PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS SUB_GID_COUNT SUB_GID_MAX SUB_GID_MIN SUB_UID_COUNT SUB_UID_MAX SUB_UID_MIN SYS_GID_MAX SYS_GID_MIN SYS_UID_MAX SYS_UID_MIN UID_MAX UID_MIN UMASK .RE .PP pwck .RS 4 PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE .RE .PP pwconv .RS 4 PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE .RE .PP su .RS 4 CONSOLE_GROUPS DEFAULT_HOME ENV_PATH ENV_SUPATH SULOG_FILE SU_NAME SYSLOG_SU_ENAB .RE .PP sulogin .RS 4 ENV_HZ .RE .PP useradd .RS 4 CREATE_HOME GID_MAX GID_MIN HOME_MODE LASTLOG_UID_MAX MAIL_DIR MAX_MEMBERS_PER_GROUP PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE SUB_GID_COUNT SUB_GID_MAX SUB_GID_MIN SUB_UID_COUNT SUB_UID_MAX SUB_UID_MIN SYS_GID_MAX SYS_GID_MIN SYS_UID_MAX SYS_UID_MIN UID_MAX UID_MIN UMASK .RE .PP userdel .RS 4 MAIL_DIR MAIL_FILE MAX_MEMBERS_PER_GROUP USERDEL_CMD USERGROUPS_ENAB .RE .PP usermod .RS 4 LASTLOG_UID_MAX MAIL_DIR MAIL_FILE MAX_MEMBERS_PER_GROUP .RE .SH "ОШИБКИ РЕАЛИЗАЦИИ" .PP Much of the functionality that used to be provided by the shadow password suite is now handled by PAM\&. Thus, /etc/login\&.defs is no longer used by \fBpasswd\fR(1), or less used by \fBlogin\fR(1), and \fBsu\fR(1)\&. Please refer to the corresponding PAM configuration files instead\&. .SH "СМОТРИТЕ ТАКЖЕ" .PP \fBlogin\fR(1), \fBpasswd\fR(1), \fBsu\fR(1), \fBpasswd\fR(5), \fBshadow\fR(5), \fBpam\fR(8)\&.