14
14
login \- начинает сеанс в системе
17
\fBlogin\fR [\-p] [\fIимя_пользователя\fR] [\fIПЕРЕМЕННАЯ_СРЕДЫ=ЗНАЧЕНИЕ\fR...]
17
\fBlogin\fR [\-p] [\-h\ \fIхост\fR] [\fIимя_пользователя\fR] [\fIПЕРЕМЕННАЯ_СРЕДЫ=ЗНАЧЕНИЕ\fR...]
19
\fBlogin\fR [\-p] [\-h\ \fIхост\fR] [\-f\ \fIимя_пользователя\fR]
19
\fBlogin\fR [\-p] [\-h\ \fIхост\fR] \-f \fIимя_пользователя\fR
21
21
\fBlogin\fR [\-p] \-r\ \fIхост\fR
26
используется для запуска нового сеанса в системе\. Как правило, эта программа вызывается автоматически и выводит приглашение
26
program is used to establish a new session with the system\&. It is normally invoked automatically by responding to the
28
на терминал пользователя\. Программа
30
может восприниматься оболочкой командной строки не как простая программа и вызываться не как подпроцесс\. Обычно, оболочка запускает
33
\fBexec login\fR, что приводит к завершению работы пользователя в текущей оболочке\. Попытка запустить
35
из любой оболочки, отличной от регистрационной, приводит к сообщению об ошибке\.
37
В какой\-то момент пользователя попросят ввести свой пароль\. Чтобы недопустить раскрытия, символы при вводе пароля не отображаются\. Разрешено очень маленькое число попыток ввода неправильного пароля, перед тем как
39
закончит работу и прервёт подключение\.
41
Если включён механизм устаревания пароля учётной записи, то перед входом в систему может потребоваться смена пароля\. Для этого нужно ввести старый пароль и новый пароль\. Подробней об этом написано в
44
После успешного входа в систему, будут показаны сообщения от системы и о наличии почты\. Можно отключить вывод файла системных сообщений из файла
28
prompt on the user\'s terminal\&.
30
may be special to the shell and may not be invoked as a sub\-process\&. When called from a shell,
34
which will cause the user to exit from the current shell (and thus will prevent the new logged in user to return to the session of the caller)\&. Attempting to execute
36
from any shell but the login shell will produce an error message\&.
38
В какой\-то момент пользователя попросят ввести свой пароль\&. Чтобы недопустить раскрытия, символы при вводе пароля не отображаются\&. Разрешено очень маленькое число попыток ввода неправильного пароля, перед тем как
40
закончит работу и прервёт подключение\&.
42
Если включён механизм устаревания пароля учётной записи, то перед входом в систему может потребоваться смена пароля\&. Для этого нужно ввести старый пароль и новый пароль\&. Подробней об этом написано в
45
После успешного входа в систему, будут показаны сообщения от системы и о наличии почты\&. Можно отключить вывод файла системных сообщений из файла
45
46
\fI/etc/motd\fR, создав в домашнем каталоге файл нулевой длины с именем
46
\fI\.hushlogin\fR\. Сообщение о наличии почты может быть одним из: "\fIУ вас есть новая почта\.\fR", "\fIУ вас есть почта\.\fR" или "\fIУ вас нет почты\.\fR", в зависимости от наполненности почтового ящика\.
47
\fI\&.hushlogin\fR\&. Сообщение о наличии почты может быть одним из: "\fIУ вас есть новая почта\&.\fR", "\fIУ вас есть почта\&.\fR" или "\fIУ вас нет почты\&.\fR", в зависимости от наполненности почтового ящика\&.
48
49
Значения идентификатора учётной записи и группы будет взято из файла
49
\fI/etc/passwd\fR\. Значения переменных
50
\fI/etc/passwd\fR\&. Значения переменных
56
устанавливаются согласно соответствующим полям учётной записи пользователя\. Также могут быть установлены значения ulimit, umask и nice из поля GECOS\.
57
устанавливаются согласно соответствующим полям учётной записи пользователя\&. Также могут быть установлены значения ulimit, umask и nice из поля GECOS\&.
58
59
В некоторых системах переменной среды
60
61
будет присвоен тип терминала линии tty, согласно данным из файла
63
Также может быть выполнен сценарий инициализации пользовательского интерпретатора команд\. Подробней об этой функции смотрите соответствующую страницу руководства\.
65
Субсистемный вход в систему можно распознать по наличию символа "*" в начале регистрационной оболочки\. Заданный домашний каталог будет использован как корень новой файловой системы, в которой регистрируется пользователь\.
64
Также может быть выполнен сценарий инициализации пользовательского интерпретатора команд\&. Подробней об этой функции смотрите соответствующую страницу руководства\&.
66
Субсистемный вход в систему можно распознать по наличию символа "*" в начале регистрационной оболочки\&. Заданный домашний каталог будет использован как корень новой файловой системы, в которой регистрируется пользователь\&.
69
НЕ удаляет записи о пользователях из файла utmp\. Эта задача программ
70
НЕ удаляет записи о пользователях из файла utmp\&. Эта задача программ
73
удалять записи о владельце терминального сеанса\. Если
74
удалять записи о владельце терминального сеанса\&. Если
75
76
запускается из командной строки без
76
\fBexec\fR, то пользователь продолжает находиться в системе даже после завершения работы в "порождённом сеансе"\.
77
\fBexec\fR, то пользователь продолжает находиться в системе даже после завершения работы в "порождённом сеансе"\&.
81
Не выполнять аутентификацию, пользователь уже прошёл проверку\.
82
Не выполнять аутентификацию, пользователь уже прошёл проверку\&.
86
Имя удалённого хоста, на который нужно войти\.
91
Имя удалённого хоста, на который нужно войти\&.
96
Выполнить протокол autologin для rlogin\.
101
Выполнить протокол autologin для rlogin\&.
104
109
используются только если
106
запускается суперпользователем\.
111
запускается суперпользователем\&.
107
112
.SH "ПРЕДОСТЕРЕЖЕНИЯ"
111
может быть собрана с разными параметрами и только некоторые из них смогут быть использованы на любой машине\.
116
может быть собрана с разными параметрами и только некоторые из них смогут быть использованы на любой машине\&.
113
Расположение файлов может отличаться на разных системах\.
118
Расположение файлов может отличаться на разных системах\&.
117
НЕ удаляет записи о пользователях из файла utmp\. Эта задача программ
122
НЕ удаляет записи о пользователях из файла utmp\&. Эта задача программ
121
удалять записи о владельце терминального сеанса\. Если
126
удалять записи о владельце терминального сеанса\&. Если
123
128
запускается из командной строки без
124
\fBexec\fR, то пользователь продолжает находиться в системе даже после завершения работы в "порождённом сеансе"\.
129
\fBexec\fR, то пользователь продолжает находиться в системе даже после завершения работы в "порождённом сеансе"\&.
126
131
As with any program,
127
\fBlogin\fR\'s appearance can be faked\. If non\-trusted users have physical access to a machine, an attacker could use this to obtain the password of the next person coming to sit in front of the machine\. Under Linux, the SAK mechanism can be used by users to initiate a trusted path and prevent this kind of attack\.
132
\fBlogin\fR\'s appearance can be faked\&. If non\-trusted users have physical access to a machine, an attacker could use this to obtain the password of the next person coming to sit in front of the machine\&. Under Linux, the SAK mechanism can be used by users to initiate a trusted path and prevent this kind of attack\&.
128
133
.SH "CONFIGURATION"
130
135
The following configuration variables in
131
\fI/etc/login\.defs\fR
136
\fI/etc/login\&.defs\fR
132
137
change the behavior of this tool:
134
139
\fBCONSOLE\fR (string)
136
If defined, either full pathname of a file containing device names or a ":" delimited list of device names\. Root logins will be allowed only upon these devices\.
141
If defined, either full pathname of a file containing device names or a ":" delimited list of device names\&. Root logins will be allowed only upon these devices\&.
138
If not defined, root will be allowed on any device\.
143
If not defined, root will be allowed on any device\&.
141
146
\fBCONSOLE_GROUPS\fR (string)
143
List of groups to add to the user\'s supplementary group set when logging in on the console (as determined by the CONSOLE setting)\. Default is none\.
148
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\&.
145
Use with caution \- it is possible for users to gain permanent access to these groups, even when not logged in on the console\.
150
Use with caution \- it is possible for users to gain permanent access to these groups, even when not logged in on the console\&.
148
153
\fBDEFAULT_HOME\fR (boolean)
150
Indicate if login is allowed if we can\'t cd to the home directory\. Default in no\.
155
Indicate if login is allowed if we can\'t cd to the home directory\&. Default in no\&.
153
\fIyes\fR, the user will login in the root (\fI/\fR) directory if it is not possible to cd to her home directory\.
158
\fIyes\fR, the user will login in the root (\fI/\fR) directory if it is not possible to cd to her home directory\&.
156
161
\fBENV_HZ\fR (string)
158
If set, it will be used to define the HZ environment variable when a user login\. The value must be preceded by
159
\fIHZ=\fR\. A common value on Linux is
163
If set, it will be used to define the HZ environment variable when a user login\&. The value must be preceded by
164
\fIHZ=\fR\&. A common value on Linux is
163
168
\fBENV_PATH\fR (string)
165
If set, it will be used to define the PATH environment variable when a regular user login\. The value can be preceded by
170
If set, it will be used to define the PATH environment variable when a regular user login\&. The value can be preceded by
166
171
\fIPATH=\fR, or a colon separated list of paths (for example
167
\fI/bin:/usr/bin\fR)\. The default value is
168
\fIPATH=/bin:/usr/bin\fR\.
172
\fI/bin:/usr/bin\fR)\&. The default value is
173
\fIPATH=/bin:/usr/bin\fR\&.
171
176
\fBENV_SUPATH\fR (string)
173
If set, it will be used to define the PATH environment variable when the superuser login\. The value can be preceded by
178
If set, it will be used to define the PATH environment variable when the superuser login\&. The value can be preceded by
174
179
\fIPATH=\fR, or a colon separated list of paths (for example
175
\fI/sbin:/bin:/usr/sbin:/usr/bin\fR)\. The default value is
176
\fIPATH=/bin:/usr/bin\fR\.
180
\fI/sbin:/bin:/usr/sbin:/usr/bin\fR)\&. The default value is
181
\fIPATH=/bin:/usr/bin\fR\&.
179
184
\fBENV_TZ\fR (string)
181
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
186
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
184
189
\fITZ=CST6CDT\fR), or the full path to the file containing the timezone specification (for example
190
\fI/etc/tzname\fR)\&.
187
192
If a full path is specified but the file does not exist or cannot be read, the default is to use
191
196
\fBENVIRON_FILE\fR (string)
193
If this file exists and is readable, login environment will be read from it\. Every line should be in the form name=value\.
198
If this file exists and is readable, login environment will be read from it\&. Every line should be in the form name=value\&.
196
201
\fBERASECHAR\fR (number)
222
227
will execute this shell instead of the users\' shell specified in
226
231
\fBFTMP_FILE\fR (string)
228
If defined, login failures will be logged in this file in a utmp format\.
233
If defined, login failures will be logged in this file in a utmp format\&.
231
236
\fBHUSHLOGIN_FILE\fR (string)
233
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\.
238
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\&.
236
241
\fBISSUE_FILE\fR (string)
238
If defined, this file will be displayed before each login prompt\.
243
If defined, this file will be displayed before each login prompt\&.
241
246
\fBKILLCHAR\fR (number)
243
248
Terminal KILL character (\fI025\fR
246
The value can be prefixed "0" for an octal value, or "0x" for an hexadecimal value\.
251
The value can be prefixed "0" for an octal value, or "0x" for an hexadecimal value\&.
249
254
\fBLASTLOG_ENAB\fR (boolean)
251
Enable logging and display of /var/log/lastlog login time info\.
256
Enable logging and display of /var/log/lastlog login time info\&.
254
259
\fBLOGIN_RETRIES\fR (number)
256
Maximum number of login retries in case of bad password\.
261
Maximum number of login retries in case of bad password\&.
259
264
\fBLOGIN_STRING\fR (string)
261
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\.
266
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\&.
263
268
If the string contains
264
\fI%s\fR, this will be replaced by the user\'s name\.
269
\fI%s\fR, this will be replaced by the user\'s name\&.
267
272
\fBLOGIN_TIMEOUT\fR (number)
269
Max time in seconds for login\.
274
Max time in seconds for login\&.
272
277
\fBLOG_OK_LOGINS\fR (boolean)
274
Enable logging of successful logins\.
279
Enable logging of successful logins\&.
277
282
\fBLOG_UNKFAIL_ENAB\fR (boolean)
279
Enable display of unknown usernames when login failures are recorded\.
284
Enable display of unknown usernames when login failures are recorded\&.
281
Note: logging unknown usernames may be a security issue if an user enter her password instead of her login name\.
286
Note: logging unknown usernames may be a security issue if an user enter her password instead of her login name\&.
284
289
\fBMAIL_CHECK_ENAB\fR (boolean)
286
Enable checking and display of mailbox status upon login\.
291
Enable checking and display of mailbox status upon login\&.
288
You should disable it if the shell startup files already check for mail ("mailx \-e" or equivalent)\.
293
You should disable it if the shell startup files already check for mail ("mailx \-e" or equivalent)\&.
291
296
\fBMAIL_DIR\fR (string)
293
Почтовый каталог\. Данный параметр нужен для управления почтовым ящиком при изменении или удалении учётной записи пользователя\. Если параметр не задан, то используется значение указанное при сборке\.
298
Почтовый каталог\&. Данный параметр нужен для управления почтовым ящиком при изменении или удалении учётной записи пользователя\&. Если параметр не задан, то используется значение указанное при сборке\&.
296
301
\fBMAIL_FILE\fR (string)
298
Defines the location of the users mail spool files relatively to their home directory\.
303
Defines the location of the users mail spool files relatively to their home directory\&.
307
312
\fBusermod\fR, and
309
to create, move, or delete the user\'s mail spool\.
314
to create, move, or delete the user\'s mail spool\&.
312
317
\fBMAIL_CHECK_ENAB\fR
314
319
\fIyes\fR, they are also used to define the
316
environment variable\.
321
environment variable\&.
318
323
\fBMOTD_FILE\fR (string)
320
If defined, ":" delimited list of "message of the day" files to be displayed upon login\.
325
If defined, ":" delimited list of "message of the day" files to be displayed upon login\&.
323
328
\fBNOLOGINS_FILE\fR (string)
325
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\.
330
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\&.
328
333
\fBPORTTIME_CHECKS_ENAB\fR (boolean)
330
Enable checking of time restrictions specified in /etc/porttime\.
335
Enable checking of time restrictions specified in /etc/porttime\&.
333
338
\fBQUOTAS_ENAB\fR (boolean)
335
Enable setting of ulimit, umask, and niceness from passwd gecos field\.
340
Enable setting of ulimit, umask, and niceness from passwd gecos field\&.
338
343
\fBTTYGROUP\fR (string), \fBTTYPERM\fR (string)
340
345
The terminal permissions: the login tty will be owned by the
342
347
group, and the permissions will be set to
345
350
By default, the ownership of the terminal is set to the user\'s primary group and the permissions are set to
350
can be either the name of a group or a numeric group identifier\.
355
can be either the name of a group or a numeric group identifier\&.
354
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\.
359
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\&.
357
362
\fBTTYTYPE_FILE\fR (string)
359
If defined, file which maps tty line to TERM environment parameter\. Each line of the file is in a format something like "vt100 tty01"\.
364
If defined, file which maps tty line to TERM environment parameter\&. Each line of the file is in a format something like "vt100 tty01"\&.
362
367
\fBULIMIT\fR (number)
369
374
\fBUMASK\fR (number)
371
Задаёт начальное значение маски доступа\. Если не указано, то маска доступа устанавливается в 022\.
376
The file mode creation mask is initialized to this value\&. If not specified, the mask will be initialized to 022\&.
382
use this mask to set the mode of the home directory they create
386
to define users\' initial umask\&. Note that this mask can be overriden by the user\'s GECOS line (if
388
is set) or by the specification of a limit with the
374
394
\fBUSERGROUPS_ENAB\fR (boolean)
376
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\.
396
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\&.
381
401
will remove the user\'s group if it contains no more members, and
383
will create by default a group with the name of the user\.
403
will create by default a group with the name of the user\&.