3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
6 .\" Manual: Пользовательские команды
7 .\" Source: Пользовательские команды
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 su \- изменяет ID пользователя или делает его суперпользователем
34 \fBsu\fR [\fIпараметры\fR] [\fIимя_пользователя\fR]
39 используется для того, чтобы пользователь мог стать другим пользователем в текущей сессии\&. Если
42 \fBимени_пользователя\fR, то это по умолчанию делает пользователя суперпользователем\&. Необязательный параметр
44 можно использовать для воссоздания рабочей среды, такой же как если бы настоящий пользователь выполнял вход в систему\&.
46 После имени пользователя можно указать дополнительные аргументы, которые будут переданы регистрационной оболочке пользователя\&. В частности, аргумент
48 заставит большинство оболочек считать следующий аргумент как команду\&. Команда будет выполнена оболочкой, указанной в файле
49 /etc/passwd, которая является регистрационной для указываемого пользователя\&.
51 Вы можете использовать параметр
53 чтобы отделить параметры
55 от параметров передаваемых оболочке\&.
57 Пользователю предложат ввести пароль, если он задан\&. При неверном пароле возникает сообщение об ошибке\&. Все попытки, удачные и неудачные, протоколируются системой с целью обнаружения злоупотреблений\&.
59 The current environment is passed to the new shell\&. The value of
64 /sbin:/bin:/usr/sbin:/usr/bin
65 for the superuser\&. This may be changed with the
72 Субсистемный вход в систему можно распознать по наличию символа "*" в начале регистрационной оболочки\&. Заданный домашний каталог будет использован как корень новой файловой системы, в которой регистрируется пользователь\&.
78 \fB\-c\fR, \fB\-\-command\fR\fIКОМАНДА\fR
80 Указать команду, которая будет запущена оболочкой в виде параметра для
84 \fB\-\fR, \fB\-l\fR, \fB\-\-login\fR
86 Предоставляет среду, как если бы пользователь непосредственно регистрировался в системе\&.
89 \fB\-\fR, то он должен быть задан последним параметром
90 \fBsu\fR\&. Другие формы (\fB\-l\fR
92 \fB\-\-login\fR) не имеют этого ограничения\&.
95 \fB\-s\fR, \fB\-\-shell\fR\fIОБОЛОЧКА\fR
97 Оболочка, которая будет запущена\&.
99 Запущенная оболочка выбирается из (в порядке убывания приоритета):
102 Оболочка указанная в параметре \-\-shell\&.
107 \fB\-\-preserve\-environment\fR, то оболочка задаётся переменной среды
112 Оболочка, указанная в записи файла
114 для заданного пользователя\&.
118 /bin/sh, если ни одной оболочке не было найдено с помощью методов, указанных выше\&.
121 Если заданный пользователь имеет ограниченную оболочку (то есть оболочка в поле пользовательской записи в файле
124 /etc/shell), то параметр
128 не будет взята в учётную запись, если
130 не была запущена суперпользователем\&.
133 \fB\-m\fR, \fB\-p\fR, \fB\-\-preserve\-environment\fR
135 Preserve the current environment, except for:
139 reset according to the
151 \(Fo<space><tab><newline>\(Fc, if it was set\&.
154 Если заданный пользователь имеет ограниченную оболочку, то этот параметр не сработает (если
156 не запускается суперпользователем)\&.
158 Note that the default behavior for the environment is the following:
168 environment variables are reset\&.
174 is not used, the environment is copied, except for the variables above\&.
185 environment variables are copied if they were set\&.
195 environment variables are set according to the
208 is used, other environment variables might be set by the
214 .SH "ПРЕДОСТЕРЕЖЕНИЯ"
216 Данная версия программы
218 может быть собрана с разными параметрами и только некоторые из них смогут быть использованы на любой машине\&.
221 The following configuration variables in
223 change the behavior of this tool:
225 \fBCONSOLE\fR (string)
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\&.
229 If not defined, root will be allowed on any device\&.
231 The device should be specified without the /dev/ prefix\&.
234 \fBCONSOLE_GROUPS\fR (string)
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\&.
238 Use with caution \- it is possible for users to gain permanent access to these groups, even when not logged in on the console\&.
241 \fBDEFAULT_HOME\fR (boolean)
243 Indicate if login is allowed if we can\*(Aqt cd to the home directory\&. Default in no\&.
246 \fIyes\fR, the user will login in the root (/) directory if it is not possible to cd to her home directory\&.
249 \fBENV_HZ\fR (string)
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
256 \fBENVIRON_FILE\fR (string)
258 If this file exists and is readable, login environment will be read from it\&. Every line should be in the form name=value\&.
260 Lines starting with a # are treated as comment lines and ignored\&.
263 \fBENV_PATH\fR (string)
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\&.
271 \fBENV_SUPATH\fR (string)
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\&.
279 \fBENV_TZ\fR (string)
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
284 \fITZ=CST6CDT\fR), or the full path to the file containing the timezone specification (for example
287 If a full path is specified but the file does not exist or cannot be read, the default is to use
291 \fBLOGIN_STRING\fR (string)
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\&.
295 If the string contains
296 \fI%s\fR, this will be replaced by the user\*(Aqs name\&.
299 \fBMAIL_CHECK_ENAB\fR (boolean)
301 Enable checking and display of mailbox status upon login\&.
303 You should disable it if the shell startup files already check for mail ("mailx \-e" or equivalent)\&.
306 \fBMAIL_DIR\fR (string)
308 Почтовый каталог\&. Данный параметр нужен для управления почтовым ящиком при изменении или удалении учётной записи пользователя\&. Если параметр не задан, то используется значение указанное при сборке\&.
311 \fBMAIL_FILE\fR (string)
313 Defines the location of the users mail spool files relatively to their home directory\&.
320 variables are used by
324 to create, move, or delete the user\*(Aqs mail spool\&.
327 \fBMAIL_CHECK_ENAB\fR
329 \fIyes\fR, they are also used to define the
331 environment variable\&.
333 \fBQUOTAS_ENAB\fR (boolean)
335 Enable setting of ulimit, umask, and niceness from passwd gecos field\&.
338 \fBSULOG_FILE\fR (string)
340 If defined, all su activity is logged to this file\&.
343 \fBSU_NAME\fR (string)
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"\&.
348 \fBSU_WHEEL_ONLY\fR (boolean)
351 \fIyes\fR, the user must be listed as a member of the first gid 0 group in
355 on most Linux systems) to be able to
357 to uid 0 accounts\&. If the group doesn\*(Aqt exist or is empty, no one will be able to
362 \fBSYSLOG_SU_ENAB\fR (boolean)
364 Enable "syslog" logging of
366 activity \- in addition to sulog file logging\&.
369 \fBUSERGROUPS_ENAB\fR (boolean)
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\&.
376 will remove the user\*(Aqs group if it contains no more members, and
378 will create by default a group with the name of the user\&.
384 содержит информацию о пользователях
389 содержит защищаемую информацию о пользователях
394 содержит конфигурацию подсистемы теневых паролей