Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / ru / login.1
1 '\" t
2 .\"     Title: login
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5 .\"      Date: 02/16/2011
6 .\"    Manual: Пользовательские команды
7 .\"    Source: Пользовательские команды
8 .\"  Language: Russian
9 .\"
10 .TH "login" "1" "02/16/2011" "Пользовательские команды" "Пользовательские команды"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "НАЗВАНИЕ"
31 login \- начинает сеанс в системе
32 .SH "СИНТАКСИС"
33 .HP \w'\fBlogin\fR\ 'u
34 \fBlogin\fR [\-p] [\-h\ \fIхост\fR] [\fIимя_пользователя\fR] [\fIПЕРЕМЕННАЯ_СРЕДЫ=ЗНАЧЕНИЕ\fR...]
35 .HP \w'\fBlogin\fR\ 'u
36 \fBlogin\fR [\-p] [\-h\ \fIхост\fR] \-f \fIимя_пользователя\fR
37 .HP \w'\fBlogin\fR\ 'u
38 \fBlogin\fR [\-p] \-r\ \fIхост\fR
39 .SH "ОПИСАНИЕ"
40 .PP
41 The
42 \fBlogin\fR
43 program is used to establish a new session with the system\&. It is normally invoked automatically by responding to the
44 \fIlogin:\fR
45 prompt on the user\*(Aqs terminal\&.
46 \fBlogin\fR
47 may be special to the shell and may not be invoked as a sub\-process\&. When called from a shell,
48 \fBlogin\fR
49 should be executed as
50 \fBexec login\fR
51 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
52 \fBlogin\fR
53 from any shell but the login shell will produce an error message\&.
54 .PP
55 В какой\-то момент пользователя попросят ввести свой пароль\&. Чтобы недопустить раскрытия, символы при вводе пароля не отображаются\&. Разрешено очень маленькое число попыток ввода неправильного пароля, перед тем как
56 \fBlogin\fR
57 закончит работу и прервёт подключение\&.
58 .PP
59 Если включён механизм устаревания пароля учётной записи, то перед входом в систему может потребоваться смена пароля\&. Для этого нужно ввести старый пароль и новый пароль\&. Подробней об этом написано в
60 \fBpasswd\fR(1)\&.
61 .PP
62 После успешного входа в систему, будут показаны сообщения от системы и о наличии почты\&. Можно отключить вывод файла системных сообщений из файла
63 /etc/motd, создав в домашнем каталоге файл нулевой длины с именем
64 \&.hushlogin\&. Сообщение о наличии почты может быть одним из: "\fIУ вас есть новая почта\&.\fR", "\fIУ вас есть почта\&.\fR" или "\fIУ вас нет почты\&.\fR", в зависимости от наполненности почтового ящика\&.
65 .PP
66 Значения идентификатора учётной записи и группы будет взято из файла
67 /etc/passwd\&. Значения переменных
68 \fB$HOME\fR,
69 \fB$SHELL\fR,
70 \fB$PATH\fR,
71 \fB$LOGNAME\fR
72 и
73 \fB$MAIL\fR
74 устанавливаются согласно соответствующим полям учётной записи пользователя\&. Также могут быть установлены значения ulimit, umask и nice из поля GECOS\&.
75 .PP
76 В некоторых системах переменной среды
77 \fB$TERM\fR
78 будет присвоен тип терминала линии tty, согласно данным из файла
79 /etc/ttytype\&.
80 .PP
81 Также может быть выполнен сценарий инициализации пользовательского интерпретатора команд\&. Подробней об этой функции смотрите соответствующую страницу руководства\&.
82 .PP
83 Субсистемный вход в систему можно распознать по наличию символа "*" в начале регистрационной оболочки\&. Заданный домашний каталог будет использован как корень новой файловой системы, в которой регистрируется пользователь\&.
84 .PP
85 Программа
86 \fBlogin\fR
87 НЕ удаляет записи о пользователях из файла utmp\&. Эта задача программ
88 \fBgetty\fR(8)
89 и
90 \fBinit\fR(8)
91 удалять записи о владельце терминального сеанса\&. Если
92 \fBlogin\fR
93 запускается из командной строки без
94 \fBexec\fR, то пользователь продолжает находиться в системе даже после завершения работы в "порождённом сеансе"\&.
95 .SH "ПАРАМЕТРЫ"
96 .PP
97 \fB\-f\fR
98 .RS 4
99 Не выполнять аутентификацию, пользователь уже прошёл проверку\&.
100 .sp
101 Note: In that case,
102 \fIusername\fR
103 is mandatory\&.
104 .RE
105 .PP
106 \fB\-h\fR
107 .RS 4
108 Имя удалённого хоста, на который нужно войти\&.
109 .RE
110 .PP
111 \fB\-p\fR
112 .RS 4
113 Сохранить среду\&.
114 .RE
115 .PP
116 \fB\-r\fR
117 .RS 4
118 Выполнить протокол autologin для rlogin\&.
119 .RE
120 .PP
121 Параметры
122 \fB\-r\fR,
123 \fB\-h\fR
124 и
125 \fB\-f\fR
126 используются только если
127 \fBlogin\fR
128 запускается суперпользователем\&.
129 .SH "ПРЕДОСТЕРЕЖЕНИЯ"
130 .PP
131 Данная версия
132 \fBlogin\fR
133 может быть собрана с разными параметрами и только некоторые из них смогут быть использованы на любой машине\&.
134 .PP
135 Расположение файлов может отличаться на разных системах\&.
136 .PP
137 Программа
138 \fBlogin\fR
139 НЕ удаляет записи о пользователях из файла utmp\&. Эта задача программ
140 \fBgetty\fR(8)
141 и
142 \fBinit\fR(8)
143 удалять записи о владельце терминального сеанса\&. Если
144 \fBlogin\fR
145 запускается из командной строки без
146 \fBexec\fR, то пользователь продолжает находиться в системе даже после завершения работы в "порождённом сеансе"\&.
147 .PP
148 As with any program,
149 \fBlogin\fR\*(Aqs 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\&.
150 .SH "CONFIGURATION"
151 .PP
152 The following configuration variables in
153 /etc/login\&.defs
154 change the behavior of this tool:
155 .PP
156 \fBCONSOLE\fR (string)
157 .RS 4
158 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\&.
159 .sp
160 If not defined, root will be allowed on any device\&.
161 .sp
162 The device should be specified without the /dev/ prefix\&.
163 .RE
164 .PP
165 \fBCONSOLE_GROUPS\fR (string)
166 .RS 4
167 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\&.
168
169 Use with caution \- it is possible for users to gain permanent access to these groups, even when not logged in on the console\&.
170 .RE
171 .PP
172 \fBDEFAULT_HOME\fR (boolean)
173 .RS 4
174 Indicate if login is allowed if we can\*(Aqt cd to the home directory\&. Default in no\&.
175 .sp
176 If set to
177 \fIyes\fR, the user will login in the root (/) directory if it is not possible to cd to her home directory\&.
178 .RE
179 .PP
180 \fBENV_HZ\fR (string)
181 .RS 4
182 If set, it will be used to define the HZ environment variable when a user login\&. The value must be preceded by
183 \fIHZ=\fR\&. A common value on Linux is
184 \fIHZ=100\fR\&.
185 .RE
186 .PP
187 \fBENV_PATH\fR (string)
188 .RS 4
189 If set, it will be used to define the PATH environment variable when a regular user login\&. The value can be preceded by
190 \fIPATH=\fR, or a colon separated list of paths (for example
191 \fI/bin:/usr/bin\fR)\&. The default value is
192 \fIPATH=/bin:/usr/bin\fR\&.
193 .RE
194 .PP
195 \fBENV_SUPATH\fR (string)
196 .RS 4
197 If set, it will be used to define the PATH environment variable when the superuser login\&. The value can be preceded by
198 \fIPATH=\fR, or a colon separated list of paths (for example
199 \fI/sbin:/bin:/usr/sbin:/usr/bin\fR)\&. The default value is
200 \fIPATH=/bin:/usr/bin\fR\&.
201 .RE
202 .PP
203 \fBENV_TZ\fR (string)
204 .RS 4
205 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
206 \fITZ=\fR
207 (for example
208 \fITZ=CST6CDT\fR), or the full path to the file containing the timezone specification (for example
209 /etc/tzname)\&.
210 .sp
211 If a full path is specified but the file does not exist or cannot be read, the default is to use
212 \fITZ=CST6CDT\fR\&.
213 .RE
214 .PP
215 \fBENVIRON_FILE\fR (string)
216 .RS 4
217 If this file exists and is readable, login environment will be read from it\&. Every line should be in the form name=value\&.
218 .sp
219 Lines starting with a # are treated as comment lines and ignored\&.
220 .RE
221 .PP
222 \fBERASECHAR\fR (number)
223 .RS 4
224 Terminal ERASE character (\fI010\fR
225 = backspace,
226 \fI0177\fR
227 = DEL)\&.
228 .sp
229 The value can be prefixed "0" for an octal value, or "0x" for an hexadecimal value\&.
230 .RE
231 .PP
232 \fBFAIL_DELAY\fR (number)
233 .RS 4
234 Delay in seconds before being allowed another attempt after a login failure\&.
235 .RE
236 .PP
237 \fBFAILLOG_ENAB\fR (boolean)
238 .RS 4
239 Enable logging and display of
240 /var/log/faillog
241 login failure info\&.
242 .RE
243 .PP
244 \fBFAKE_SHELL\fR (string)
245 .RS 4
246 If set,
247 \fBlogin\fR
248 will execute this shell instead of the users\*(Aq shell specified in
249 /etc/passwd\&.
250 .RE
251 .PP
252 \fBFTMP_FILE\fR (string)
253 .RS 4
254 If defined, login failures will be logged in this file in a utmp format\&.
255 .RE
256 .PP
257 \fBHUSHLOGIN_FILE\fR (string)
258 .RS 4
259 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\*(Aqs 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\*(Aqs home directory\&.
260 .RE
261 .PP
262 \fBISSUE_FILE\fR (string)
263 .RS 4
264 If defined, this file will be displayed before each login prompt\&.
265 .RE
266 .PP
267 \fBKILLCHAR\fR (number)
268 .RS 4
269 Terminal KILL character (\fI025\fR
270 = CTRL/U)\&.
271 .sp
272 The value can be prefixed "0" for an octal value, or "0x" for an hexadecimal value\&.
273 .RE
274 .PP
275 \fBLASTLOG_ENAB\fR (boolean)
276 .RS 4
277 Enable logging and display of /var/log/lastlog login time info\&.
278 .RE
279 .PP
280 \fBLOGIN_RETRIES\fR (number)
281 .RS 4
282 Maximum number of login retries in case of bad password\&.
283 .RE
284 .PP
285 \fBLOGIN_STRING\fR (string)
286 .RS 4
287 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\&.
288 .sp
289 If the string contains
290 \fI%s\fR, this will be replaced by the user\*(Aqs name\&.
291 .RE
292 .PP
293 \fBLOGIN_TIMEOUT\fR (number)
294 .RS 4
295 Max time in seconds for login\&.
296 .RE
297 .PP
298 \fBLOG_OK_LOGINS\fR (boolean)
299 .RS 4
300 Enable logging of successful logins\&.
301 .RE
302 .PP
303 \fBLOG_UNKFAIL_ENAB\fR (boolean)
304 .RS 4
305 Enable display of unknown usernames when login failures are recorded\&.
306 .sp
307 Note: logging unknown usernames may be a security issue if an user enter her password instead of her login name\&.
308 .RE
309 .PP
310 \fBMAIL_CHECK_ENAB\fR (boolean)
311 .RS 4
312 Enable checking and display of mailbox status upon login\&.
313 .sp
314 You should disable it if the shell startup files already check for mail ("mailx \-e" or equivalent)\&.
315 .RE
316 .PP
317 \fBMAIL_DIR\fR (string)
318 .RS 4
319 Почтовый каталог\&. Данный параметр нужен для управления почтовым ящиком при изменении или удалении учётной записи пользователя\&. Если параметр не задан, то используется значение указанное при сборке\&.
320 .RE
321 .PP
322 \fBMAIL_FILE\fR (string)
323 .RS 4
324 Defines the location of the users mail spool files relatively to their home directory\&.
325 .RE
326 .PP
327 The
328 \fBMAIL_DIR\fR
329 and
330 \fBMAIL_FILE\fR
331 variables are used by
332 \fBuseradd\fR,
333 \fBusermod\fR, and
334 \fBuserdel\fR
335 to create, move, or delete the user\*(Aqs mail spool\&.
336 .PP
337 If
338 \fBMAIL_CHECK_ENAB\fR
339 is set to
340 \fIyes\fR, they are also used to define the
341 \fBMAIL\fR
342 environment variable\&.
343 .PP
344 \fBMOTD_FILE\fR (string)
345 .RS 4
346 If defined, ":" delimited list of "message of the day" files to be displayed upon login\&.
347 .RE
348 .PP
349 \fBNOLOGINS_FILE\fR (string)
350 .RS 4
351 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\&.
352 .RE
353 .PP
354 \fBPORTTIME_CHECKS_ENAB\fR (boolean)
355 .RS 4
356 Enable checking of time restrictions specified in /etc/porttime\&.
357 .RE
358 .PP
359 \fBQUOTAS_ENAB\fR (boolean)
360 .RS 4
361 Enable setting of ulimit, umask, and niceness from passwd gecos field\&.
362 .RE
363 .PP
364 \fBTTYGROUP\fR (string), \fBTTYPERM\fR (string)
365 .RS 4
366 The terminal permissions: the login tty will be owned by the
367 \fBTTYGROUP\fR
368 group, and the permissions will be set to
369 \fBTTYPERM\fR\&.
370 .sp
371 By default, the ownership of the terminal is set to the user\*(Aqs primary group and the permissions are set to
372 \fI0600\fR\&.
373 .sp
374
375 \fBTTYGROUP\fR
376 can be either the name of a group or a numeric group identifier\&.
377 .sp
378 If you have a
379 \fBwrite\fR
380 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\&.
381 .RE
382 .PP
383 \fBTTYTYPE_FILE\fR (string)
384 .RS 4
385 If defined, file which maps tty line to TERM environment parameter\&. Each line of the file is in a format something like "vt100 tty01"\&.
386 .RE
387 .PP
388 \fBULIMIT\fR (number)
389 .RS 4
390 Default
391 \fBulimit\fR
392 value\&.
393 .RE
394 .PP
395 \fBUMASK\fR (number)
396 .RS 4
397 The file mode creation mask is initialized to this value\&. If not specified, the mask will be initialized to 022\&.
398 .sp
399
400 \fBuseradd\fR
401 and
402 \fBnewusers\fR
403 use this mask to set the mode of the home directory they create
404 .sp
405 It is also used by
406 \fBlogin\fR
407 to define users\*(Aq initial umask\&. Note that this mask can be overriden by the user\*(Aqs GECOS line (if
408 \fBQUOTAS_ENAB\fR
409 is set) or by the specification of a limit with the
410 \fIK\fR
411 identifier in
412 \fBlimits\fR(5)\&.
413 .RE
414 .PP
415 \fBUSERGROUPS_ENAB\fR (boolean)
416 .RS 4
417 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\&.
418 .sp
419 If set to
420 \fIyes\fR,
421 \fBuserdel\fR
422 will remove the user\*(Aqs group if it contains no more members, and
423 \fBuseradd\fR
424 will create by default a group with the name of the user\&.
425 .RE
426 .SH "ФАЙЛЫ"
427 .PP
428 /var/run/utmp
429 .RS 4
430 содержит список работающих сеансов в системе
431 .RE
432 .PP
433 /var/log/wtmp
434 .RS 4
435 содержит список завершённых сеансов работы с системой
436 .RE
437 .PP
438 /etc/passwd
439 .RS 4
440 содержит информацию о пользователях
441 .RE
442 .PP
443 /etc/shadow
444 .RS 4
445 содержит защищаемую информацию о пользователях
446 .RE
447 .PP
448 /etc/motd
449 .RS 4
450 содержит системные сообщения за день
451 .RE
452 .PP
453 /etc/nologin
454 .RS 4
455 при существовании файла блокируется доступ в систему обычным пользователям
456 .RE
457 .PP
458 /etc/ttytype
459 .RS 4
460 содержит список типов терминалов
461 .RE
462 .PP
463 $HOME/\&.hushlogin
464 .RS 4
465 при существовании файла системные сообщения при входе в систему не выводятся
466 .RE
467 .PP
468 /etc/login\&.defs
469 .RS 4
470 содержит конфигурацию подсистемы теневых паролей
471 .RE
472 .SH "СМОТРИТЕ ТАКЖЕ"
473 .PP
474 \fBmail\fR(1),
475 \fBpasswd\fR(1),
476 \fBsh\fR(1),
477 \fBsu\fR(1),
478 \fBlogin.defs\fR(5),
479 \fBnologin\fR(5),
480 \fBpasswd\fR(5),
481 \fBsecuretty\fR(5),
482 \fBgetty\fR(8)\&.