3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
6 .\" Manual: Пользовательские команды
7 .\" Source: Пользовательские команды
10 .TH "su" "1" "07/24/2009" "Пользовательские команды" "Пользовательские команды"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
16 .\" disable justification (adjust text to left margin only)
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
22 su \- изменяет ID пользователя или делает его суперпользователем
25 \fBsu\fR [\fIпараметры\fR] [\fIимя_пользователя\fR]
30 используется для того, чтобы пользователь мог стать другим пользователем в текущей сессии\&. Если
33 \fBимени_пользователя\fR, то это по умолчанию делает пользователя суперпользователем\&. Необязательный параметр
35 можно использовать для воссоздания рабочей среды, такой же как если бы настоящий пользователь выполнял вход в систему\&.
37 После имени пользователя можно указать дополнительные аргументы, которые будут переданы регистрационной оболочке пользователя\&. В частности, аргумент
39 заставит большинство оболочек считать следующий аргумент как команду\&. Команда будет выполнена оболочкой, указанной в файле
40 /etc/passwd, которая является регистрационной для указываемого пользователя\&.
42 Вы можете использовать параметр
44 чтобы отделить параметры
46 от параметров передаваемых оболочке\&.
48 Пользователю предложат ввести пароль, если он задан\&. При неверном пароле возникает сообщение об ошибке\&. Все попытки, удачные и неудачные, протоколируются системой с целью обнаружения злоупотреблений\&.
50 The current environment is passed to the new shell\&. The value of
55 /sbin:/bin:/usr/sbin:/usr/bin
56 for the superuser\&. This may be changed with the
63 Субсистемный вход в систему можно распознать по наличию символа "*" в начале регистрационной оболочки\&. Заданный домашний каталог будет использован как корень новой файловой системы, в которой регистрируется пользователь\&.
69 \fB\-c\fR, \fB\-\-command\fR\fIКОМАНДА\fR
71 Указать команду, которая будет запущена оболочкой в виде параметра для
75 \fB\-\fR, \fB\-l\fR, \fB\-\-login\fR
77 Предоставляет среду, как если бы пользователь непосредственно регистрировался в системе\&.
80 \fB\-\fR, то он должен быть задан последним параметром
81 \fBsu\fR\&. Другие формы (\fB\-l\fR
83 \fB\-\-login\fR) не имеют этого ограничения\&.
86 \fB\-s\fR, \fB\-\-shell\fR\fIОБОЛОЧКА\fR
88 Оболочка, которая будет запущена\&.
90 Запущенная оболочка выбирается из (в порядке убывания приоритета):
93 Оболочка указанная в параметре \-\-shell\&.
98 \fB\-\-preserve\-environment\fR, то оболочка задаётся переменной среды
103 Оболочка, указанная в записи файла
105 для заданного пользователя\&.
109 /bin/sh, если ни одной оболочке не было найдено с помощью методов, указанных выше\&.
112 Если заданный пользователь имеет ограниченную оболочку (то есть оболочка в поле пользовательской записи в файле
115 /etc/shell), то параметр
119 не будет взята в учётную запись, если
121 не была запущена суперпользователем\&.
124 \fB\-m\fR, \fB\-p\fR, \fB\-\-preserve\-environment\fR
126 Preserve the current environment, except for:
130 reset according to the
142 \(Fo<space><tab><newline>\(Fc, if it was set\&.
145 Если заданный пользователь имеет ограниченную оболочку, то этот параметр не сработает (если
147 не запускается суперпользователем)\&.
149 Note that the default behavior for the environment is the following:
159 environment variables are reset\&.
165 is not used, the environment is copied, except for the variables above\&.
176 environment variables are copied if they were set\&.
186 environment variables are set according to the
199 is used, other environment variables might be set by the
205 .SH "ПРЕДОСТЕРЕЖЕНИЯ"
207 Данная версия программы
209 может быть собрана с разными параметрами и только некоторые из них смогут быть использованы на любой машине\&.
212 The following configuration variables in
214 change the behavior of this tool:
216 \fBCONSOLE\fR (string)
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\&.
220 If not defined, root will be allowed on any device\&.
222 The device should be specified without the /dev/ prefix\&.
225 \fBCONSOLE_GROUPS\fR (string)
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\&.
229 Use with caution \- it is possible for users to gain permanent access to these groups, even when not logged in on the console\&.
232 \fBDEFAULT_HOME\fR (boolean)
234 Indicate if login is allowed if we can\'t cd to the home directory\&. Default in no\&.
237 \fIyes\fR, the user will login in the root (/) directory if it is not possible to cd to her home directory\&.
240 \fBENV_HZ\fR (string)
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
247 \fBENVIRON_FILE\fR (string)
249 If this file exists and is readable, login environment will be read from it\&. Every line should be in the form name=value\&.
251 Lines starting with a # are treated as comment lines and ignored\&.
254 \fBENV_PATH\fR (string)
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\&.
262 \fBENV_SUPATH\fR (string)
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\&.
270 \fBENV_TZ\fR (string)
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
275 \fITZ=CST6CDT\fR), or the full path to the file containing the timezone specification (for example
278 If a full path is specified but the file does not exist or cannot be read, the default is to use
282 \fBLOGIN_STRING\fR (string)
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\&.
286 If the string contains
287 \fI%s\fR, this will be replaced by the user\'s name\&.
290 \fBMAIL_CHECK_ENAB\fR (boolean)
292 Enable checking and display of mailbox status upon login\&.
294 You should disable it if the shell startup files already check for mail ("mailx \-e" or equivalent)\&.
297 \fBMAIL_DIR\fR (string)
299 Почтовый каталог\&. Данный параметр нужен для управления почтовым ящиком при изменении или удалении учётной записи пользователя\&. Если параметр не задан, то используется значение указанное при сборке\&.
302 \fBMAIL_FILE\fR (string)
304 Defines the location of the users mail spool files relatively to their home directory\&.
311 variables are used by
315 to create, move, or delete the user\'s mail spool\&.
318 \fBMAIL_CHECK_ENAB\fR
320 \fIyes\fR, they are also used to define the
322 environment variable\&.
324 \fBQUOTAS_ENAB\fR (boolean)
326 Enable setting of ulimit, umask, and niceness from passwd gecos field\&.
329 \fBSULOG_FILE\fR (string)
331 If defined, all su activity is logged to this file\&.
334 \fBSU_NAME\fR (string)
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"\&.
339 \fBSU_WHEEL_ONLY\fR (boolean)
342 \fIyes\fR, the user must be listed as a member of the first gid 0 group in
346 on most Linux systems) to be able to
348 to uid 0 accounts\&. If the group doesn\'t exist or is empty, no one will be able to
353 \fBSYSLOG_SU_ENAB\fR (boolean)
355 Enable "syslog" logging of
357 activity \- in addition to sulog file logging\&.
360 \fBUSERGROUPS_ENAB\fR (boolean)
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\&.
367 will remove the user\'s group if it contains no more members, and
369 will create by default a group with the name of the user\&.
375 содержит информацию о пользователях
380 содержит защищаемую информацию о пользователях
385 содержит конфигурацию подсистемы теневых паролей