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