Tizen 2.1 base
[external/shadow-utils.git] / man / ru / su.1
1 '\" t
2 .\"     Title: su
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
5 .\"      Date: 07/24/2009
6 .\"    Manual: Пользовательские команды
7 .\"    Source: Пользовательские команды
8 .\"  Language: Russian
9 .\"
10 .TH "su" "1" "07/24/2009" "Пользовательские команды" "Пользовательские команды"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
15 .nh
16 .\" disable justification (adjust text to left margin only)
17 .ad l
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
21 .SH "НАЗВАНИЕ"
22 su \- изменяет ID пользователя или делает его суперпользователем
23 .SH "СИНТАКСИС"
24 .HP \w'\fBsu\fR\ 'u
25 \fBsu\fR [\fIпараметры\fR] [\fIимя_пользователя\fR]
26 .SH "ОПИСАНИЕ"
27 .PP
28 Программа
29 \fBsu\fR
30 используется для того, чтобы пользователь мог стать другим пользователем в текущей сессии\&. Если
31 \fBsu\fR
32 вызывается без
33 \fBимени_пользователя\fR, то это по умолчанию делает пользователя суперпользователем\&. Необязательный параметр
34 \fB\-\fR
35 можно использовать для воссоздания рабочей среды, такой же как если бы настоящий пользователь выполнял вход в систему\&.
36 .PP
37 После имени пользователя можно указать дополнительные аргументы, которые будут переданы регистрационной оболочке пользователя\&. В частности, аргумент
38 \fB\-c\fR
39 заставит большинство оболочек считать следующий аргумент как команду\&. Команда будет выполнена оболочкой, указанной в файле
40 /etc/passwd, которая является регистрационной для указываемого пользователя\&.
41 .PP
42 Вы можете использовать параметр
43 \fB\-\-\fR
44 чтобы отделить параметры
45 \fBsu\fR
46 от параметров передаваемых оболочке\&.
47 .PP
48 Пользователю предложат ввести пароль, если он задан\&. При неверном пароле возникает сообщение об ошибке\&. Все попытки, удачные и неудачные, протоколируются системой с целью обнаружения злоупотреблений\&.
49 .PP
50 The current environment is passed to the new shell\&. The value of
51 \fB$PATH\fR
52 is reset to
53 /bin:/usr/bin
54 for normal users, or
55 /sbin:/bin:/usr/sbin:/usr/bin
56 for the superuser\&. This may be changed with the
57 \fBENV_PATH\fR
58 and
59 \fBENV_SUPATH\fR
60 definitions in
61 /etc/login\&.defs\&.
62 .PP
63 Субсистемный вход в систему можно распознать по наличию символа "*" в начале регистрационной оболочки\&. Заданный домашний каталог будет использован как корень новой файловой системы, в которой регистрируется пользователь\&.
64 .SH "ПАРАМЕТРЫ"
65 .PP
66 Параметры команды
67 \fBsu\fR:
68 .PP
69 \fB\-c\fR, \fB\-\-command\fR\fIКОМАНДА\fR
70 .RS 4
71 Указать команду, которая будет запущена оболочкой в виде параметра для
72 \fB\-c\fR\&.
73 .RE
74 .PP
75 \fB\-\fR, \fB\-l\fR, \fB\-\-login\fR
76 .RS 4
77 Предоставляет среду, как если бы пользователь непосредственно регистрировался в системе\&.
78 .sp
79 Если используется
80 \fB\-\fR, то он должен быть задан последним параметром
81 \fBsu\fR\&. Другие формы (\fB\-l\fR
82 и
83 \fB\-\-login\fR) не имеют этого ограничения\&.
84 .RE
85 .PP
86 \fB\-s\fR, \fB\-\-shell\fR\fIОБОЛОЧКА\fR
87 .RS 4
88 Оболочка, которая будет запущена\&.
89 .sp
90 Запущенная оболочка выбирается из (в порядке убывания приоритета):
91 .PP
92 .RS 4
93 Оболочка указанная в параметре \-\-shell\&.
94 .RE
95 .PP
96 .RS 4
97 Если используется
98 \fB\-\-preserve\-environment\fR, то оболочка задаётся переменной среды
99 \fB$SHELL\fR\&.
100 .RE
101 .PP
102 .RS 4
103 Оболочка, указанная в записи файла
104 /etc/passwd
105 для заданного пользователя\&.
106 .RE
107 .PP
108 .RS 4
109 /bin/sh, если ни одной оболочке не было найдено с помощью методов, указанных выше\&.
110 .RE
111 .sp
112 Если заданный пользователь имеет ограниченную оболочку (то есть оболочка в поле пользовательской записи в файле
113 /etc/passwd
114 не прописана в файле
115 /etc/shell), то параметр
116 \fB\-\-shell\fR
117 или переменная среды
118 \fB$SHELL\fR
119 не будет взята в учётную запись, если
120 \fBsu\fR
121 не была запущена суперпользователем\&.
122 .RE
123 .PP
124 \fB\-m\fR, \fB\-p\fR, \fB\-\-preserve\-environment\fR
125 .RS 4
126 Preserve the current environment, except for:
127 .PP
128 \fB$PATH\fR
129 .RS 4
130 reset according to the
131 /etc/login\&.defs
132 options
133 \fBENV_PATH\fR
134 or
135 \fBENV_SUPATH\fR
136 (see below);
137 .RE
138 .PP
139 \fB$IFS\fR
140 .RS 4
141 reset to
142 \(Fo<space><tab><newline>\(Fc, if it was set\&.
143 .RE
144 .sp
145 Если заданный пользователь имеет ограниченную оболочку, то этот параметр не сработает (если
146 \fBsu\fR
147 не запускается суперпользователем)\&.
148 .sp
149 Note that the default behavior for the environment is the following:
150 .PP
151 .RS 4
152 The
153 \fB$HOME\fR,
154 \fB$SHELL\fR,
155 \fB$USER\fR,
156 \fB$LOGNAME\fR,
157 \fB$PATH\fR, and
158 \fB$IFS\fR
159 environment variables are reset\&.
160 .RE
161 .PP
162 .RS 4
163 If
164 \fB\-\-login\fR
165 is not used, the environment is copied, except for the variables above\&.
166 .RE
167 .PP
168 .RS 4
169 If
170 \fB\-\-login\fR
171 is used, the
172 \fB$TERM\fR,
173 \fB$COLORTERM\fR,
174 \fB$DISPLAY\fR, and
175 \fB$XAUTHORITY\fR
176 environment variables are copied if they were set\&.
177 .RE
178 .PP
179 .RS 4
180 If
181 \fB\-\-login\fR
182 is used, the
183 \fB$TZ\fR,
184 \fB$HZ\fR, and
185 \fB$MAIL\fR
186 environment variables are set according to the
187 /etc/login\&.defs
188 options
189 \fBENV_TZ\fR,
190 \fBENV_HZ\fR,
191 \fBMAIL_DIR\fR, and
192 \fBMAIL_FILE\fR
193 (see below)\&.
194 .RE
195 .PP
196 .RS 4
197 If
198 \fB\-\-login\fR
199 is used, other environment variables might be set by the
200 \fBENVIRON_FILE\fR
201 file (see below)\&.
202 .RE
203 .sp
204 .RE
205 .SH "ПРЕДОСТЕРЕЖЕНИЯ"
206 .PP
207 Данная версия программы
208 \fBsu\fR
209 может быть собрана с разными параметрами и только некоторые из них смогут быть использованы на любой машине\&.
210 .SH "CONFIGURATION"
211 .PP
212 The following configuration variables in
213 /etc/login\&.defs
214 change the behavior of this tool:
215 .PP
216 \fBCONSOLE\fR (string)
217 .RS 4
218 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\&.
219 .sp
220 If not defined, root will be allowed on any device\&.
221 .sp
222 The device should be specified without the /dev/ prefix\&.
223 .RE
224 .PP
225 \fBCONSOLE_GROUPS\fR (string)
226 .RS 4
227 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\&.
228
229 Use with caution \- it is possible for users to gain permanent access to these groups, even when not logged in on the console\&.
230 .RE
231 .PP
232 \fBDEFAULT_HOME\fR (boolean)
233 .RS 4
234 Indicate if login is allowed if we can\'t cd to the home directory\&. Default in no\&.
235 .sp
236 If set to
237 \fIyes\fR, the user will login in the root (/) directory if it is not possible to cd to her home directory\&.
238 .RE
239 .PP
240 \fBENV_HZ\fR (string)
241 .RS 4
242 If set, it will be used to define the HZ environment variable when a user login\&. The value must be preceded by
243 \fIHZ=\fR\&. A common value on Linux is
244 \fIHZ=100\fR\&.
245 .RE
246 .PP
247 \fBENVIRON_FILE\fR (string)
248 .RS 4
249 If this file exists and is readable, login environment will be read from it\&. Every line should be in the form name=value\&.
250 .sp
251 Lines starting with a # are treated as comment lines and ignored\&.
252 .RE
253 .PP
254 \fBENV_PATH\fR (string)
255 .RS 4
256 If set, it will be used to define the PATH environment variable when a regular user login\&. The value can be preceded by
257 \fIPATH=\fR, or a colon separated list of paths (for example
258 \fI/bin:/usr/bin\fR)\&. The default value is
259 \fIPATH=/bin:/usr/bin\fR\&.
260 .RE
261 .PP
262 \fBENV_SUPATH\fR (string)
263 .RS 4
264 If set, it will be used to define the PATH environment variable when the superuser login\&. The value can be preceded by
265 \fIPATH=\fR, or a colon separated list of paths (for example
266 \fI/sbin:/bin:/usr/sbin:/usr/bin\fR)\&. The default value is
267 \fIPATH=/bin:/usr/bin\fR\&.
268 .RE
269 .PP
270 \fBENV_TZ\fR (string)
271 .RS 4
272 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
273 \fITZ=\fR
274 (for example
275 \fITZ=CST6CDT\fR), or the full path to the file containing the timezone specification (for example
276 /etc/tzname)\&.
277 .sp
278 If a full path is specified but the file does not exist or cannot be read, the default is to use
279 \fITZ=CST6CDT\fR\&.
280 .RE
281 .PP
282 \fBLOGIN_STRING\fR (string)
283 .RS 4
284 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\&.
285 .sp
286 If the string contains
287 \fI%s\fR, this will be replaced by the user\'s name\&.
288 .RE
289 .PP
290 \fBMAIL_CHECK_ENAB\fR (boolean)
291 .RS 4
292 Enable checking and display of mailbox status upon login\&.
293 .sp
294 You should disable it if the shell startup files already check for mail ("mailx \-e" or equivalent)\&.
295 .RE
296 .PP
297 \fBMAIL_DIR\fR (string)
298 .RS 4
299 Почтовый каталог\&. Данный параметр нужен для управления почтовым ящиком при изменении или удалении учётной записи пользователя\&. Если параметр не задан, то используется значение указанное при сборке\&.
300 .RE
301 .PP
302 \fBMAIL_FILE\fR (string)
303 .RS 4
304 Defines the location of the users mail spool files relatively to their home directory\&.
305 .RE
306 .PP
307 The
308 \fBMAIL_DIR\fR
309 and
310 \fBMAIL_FILE\fR
311 variables are used by
312 \fBuseradd\fR,
313 \fBusermod\fR, and
314 \fBuserdel\fR
315 to create, move, or delete the user\'s mail spool\&.
316 .PP
317 If
318 \fBMAIL_CHECK_ENAB\fR
319 is set to
320 \fIyes\fR, they are also used to define the
321 \fBMAIL\fR
322 environment variable\&.
323 .PP
324 \fBQUOTAS_ENAB\fR (boolean)
325 .RS 4
326 Enable setting of ulimit, umask, and niceness from passwd gecos field\&.
327 .RE
328 .PP
329 \fBSULOG_FILE\fR (string)
330 .RS 4
331 If defined, all su activity is logged to this file\&.
332 .RE
333 .PP
334 \fBSU_NAME\fR (string)
335 .RS 4
336 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"\&.
337 .RE
338 .PP
339 \fBSU_WHEEL_ONLY\fR (boolean)
340 .RS 4
341 If
342 \fIyes\fR, the user must be listed as a member of the first gid 0 group in
343 /etc/group
344 (called
345 \fIroot\fR
346 on most Linux systems) to be able to
347 \fBsu\fR
348 to uid 0 accounts\&. If the group doesn\'t exist or is empty, no one will be able to
349 \fBsu\fR
350 to uid 0\&.
351 .RE
352 .PP
353 \fBSYSLOG_SU_ENAB\fR (boolean)
354 .RS 4
355 Enable "syslog" logging of
356 \fBsu\fR
357 activity \- in addition to sulog file logging\&.
358 .RE
359 .PP
360 \fBUSERGROUPS_ENAB\fR (boolean)
361 .RS 4
362 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\&.
363 .sp
364 If set to
365 \fIyes\fR,
366 \fBuserdel\fR
367 will remove the user\'s group if it contains no more members, and
368 \fBuseradd\fR
369 will create by default a group with the name of the user\&.
370 .RE
371 .SH "ФАЙЛЫ"
372 .PP
373 /etc/passwd
374 .RS 4
375 содержит информацию о пользователях
376 .RE
377 .PP
378 /etc/shadow
379 .RS 4
380 содержит защищаемую информацию о пользователях
381 .RE
382 .PP
383 /etc/login\&.defs
384 .RS 4
385 содержит конфигурацию подсистемы теневых паролей
386 .RE
387 .SH "СМОТРИТЕ ТАКЖЕ"
388 .PP
389 \fBlogin\fR(1),
390 \fBlogin.defs\fR(5),
391 \fBsg\fR(1),
392 \fBsh\fR(1)\&.