979 lines
26 KiB
HTML
979 lines
26 KiB
HTML
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<HTML><HEAD><TITLE>Man page of useradd</TITLE>
|
||
</HEAD><BODY>
|
||
<H1>useradd</H1>
|
||
Section: Команды управления системой (8)<BR>Updated: 05/28/2020<BR><A HREF="#index">Index</A>
|
||
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<A NAME="lbAB"> </A>
|
||
<H2>НАЗВАНИЕ</H2>
|
||
|
||
useradd - регистрирует нового пользователя или изменяет информацию по умолчанию о новых пользователях
|
||
<A NAME="lbAC"> </A>
|
||
<H2>СИНТАКСИС</H2>
|
||
|
||
<DL COMPACT>
|
||
<DT id="1">
|
||
<B>useradd</B> [<I>параметры</I>] <I>УЧЁТНАЯ_ЗАПИСЬ</I>
|
||
<DT id="2">
|
||
<B>useradd</B> -D
|
||
<DT id="3">
|
||
<B>useradd</B> -D [<I>параметры</I>]
|
||
</DL>
|
||
<A NAME="lbAD"> </A>
|
||
<H2>ОПИСАНИЕ</H2>
|
||
|
||
<P>
|
||
|
||
<B>useradd</B>
|
||
<DD>is a low level utility for adding users. On Debian, administrators should usually use
|
||
<B><A HREF="/cgi-bin/man/man2html?8+adduser">adduser</A></B>(8)
|
||
instead.
|
||
<P>
|
||
|
||
When invoked without the
|
||
<B>-D</B>
|
||
option, the
|
||
<B>useradd</B>
|
||
command creates a new user account using the values specified on the command line plus the default values from the system. Depending on command line options, the
|
||
<B>useradd</B>
|
||
command will update system files and may also create the new user's home directory and copy initial files.
|
||
<P>
|
||
|
||
By default, a group will also be created for the new user (see
|
||
<B>-g</B>,
|
||
<B>-N</B>,
|
||
<B>-U</B>, and
|
||
<B>USERGROUPS_ENAB</B>).
|
||
<A NAME="lbAE"> </A>
|
||
<H2>ПАРАМЕТРЫ</H2>
|
||
|
||
<P>
|
||
|
||
The options which apply to the
|
||
<B>useradd</B>
|
||
command are:
|
||
<P>
|
||
|
||
<B>--badname</B>
|
||
<DL COMPACT><DT id="4"><DD>
|
||
Allow names that do not conform to standards.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-b</B>, <B>--base-dir</B> <I>BASE_DIR</I>
|
||
<DL COMPACT><DT id="5"><DD>
|
||
The default base directory for the system if
|
||
<B>-d</B> <I>HOME_DIR</I>
|
||
is not specified.
|
||
<I>BASE_DIR</I>
|
||
is concatenated with the account name to define the home directory. If the
|
||
<B>-m</B>
|
||
option is not used,
|
||
<I>BASE_DIR</I>
|
||
must exist.
|
||
<P>
|
||
If this option is not specified,
|
||
<B>useradd</B>
|
||
will use the base directory specified by the
|
||
<B>HOME</B>
|
||
variable in
|
||
/etc/default/useradd, or
|
||
/home
|
||
by default.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-c</B>, <B>--comment</B> <I>COMMENT</I>
|
||
<DL COMPACT><DT id="6"><DD>
|
||
Любая текстовая строка. Обычно, здесь коротко описывается учётная запись, и в настоящее время используется как поле для имени и фамилии пользователя.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-d</B>, <B>--home-dir</B> <I>HOME_DIR</I>
|
||
<DL COMPACT><DT id="7"><DD>
|
||
The new user will be created using
|
||
<I>HOME_DIR</I>
|
||
as the value for the user's login directory. The default is to append the
|
||
<I>LOGIN</I>
|
||
name to
|
||
<I>BASE_DIR</I>
|
||
and use that as the login directory name. The directory
|
||
<I>HOME_DIR</I>
|
||
does not have to exist but will not be created if it is missing.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-D</B>, <B>--defaults</B>
|
||
<DL COMPACT><DT id="8"><DD>
|
||
Смотрите далее в подразделе «Изменение значений по умолчанию».
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-e</B>, <B>--expiredate</B> <I>EXPIRE_DATE</I>
|
||
<DL COMPACT><DT id="9"><DD>
|
||
The date on which the user account will be disabled. The date is specified in the format
|
||
<I>YYYY-MM-DD</I>.
|
||
<P>
|
||
If not specified,
|
||
<B>useradd</B>
|
||
will use the default expiry date specified by the
|
||
<B>EXPIRE</B>
|
||
variable in
|
||
/etc/default/useradd, or an empty string (no expiry) by default.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-f</B>, <B>--inactive</B> <I>INACTIVE</I>
|
||
<DL COMPACT><DT id="10"><DD>
|
||
Если указано значение 0, то учётная запись блокируется сразу после устаревания пароля, а при значении -1 данная возможность не используется.
|
||
<P>
|
||
If not specified,
|
||
<B>useradd</B>
|
||
will use the default inactivity period specified by the
|
||
<B>INACTIVE</B>
|
||
variable in
|
||
/etc/default/useradd, or -1 by default.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-g</B>, <B>--gid</B> <I>GROUP</I>
|
||
<DL COMPACT><DT id="11"><DD>
|
||
Имя или числовой идентификатор первичной группы пользователя. Группа с таким именем должна существовать. Идентификатор группы должен указывать на уже существующую группу.
|
||
<P>
|
||
If not specified, the behavior of
|
||
<B>useradd</B>
|
||
will depend on the
|
||
<B>USERGROUPS_ENAB</B>
|
||
variable in
|
||
/etc/login.defs. If this variable is set to
|
||
<I>yes</I>
|
||
(or
|
||
<B>-U/--user-group</B>
|
||
is specified on the command line), a group will be created for the user, with the same name as her loginname. If the variable is set to
|
||
<I>no</I>
|
||
(or
|
||
<B>-N/--no-user-group</B>
|
||
is specified on the command line), useradd will set the primary group of the new user to the value specified by the
|
||
<B>GROUP</B>
|
||
variable in
|
||
/etc/default/useradd, or 100 by default.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-G</B>, <B>--groups</B> <I>GROUP1</I>[<I>,GROUP2,...</I>[<I>,GROUPN</I>]]]
|
||
<DL COMPACT><DT id="12"><DD>
|
||
A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the
|
||
<B>-g</B>
|
||
option. The default is for the user to belong only to the initial group.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-h</B>, <B>--help</B>
|
||
<DL COMPACT><DT id="13"><DD>
|
||
Показать краткую справку и закончить работу.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-k</B>, <B>--skel</B> <I>SKEL_DIR</I>
|
||
<DL COMPACT><DT id="14"><DD>
|
||
The skeleton directory, which contains files and directories to be copied in the user's home directory, when the home directory is created by
|
||
<B>useradd</B>.
|
||
<P>
|
||
This option is only valid if the
|
||
<B>-m</B>
|
||
(or
|
||
<B>--create-home</B>) option is specified.
|
||
<P>
|
||
If this option is not set, the skeleton directory is defined by the
|
||
<B>SKEL</B>
|
||
variable in
|
||
/etc/default/useradd
|
||
or, by default,
|
||
/etc/skel.
|
||
<P>
|
||
Если возможно, выполняется копирование ACL и расширенных атрибутов.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-K</B>, <B>--key</B> <I>KEY</I>=<I>VALUE</I>
|
||
<DL COMPACT><DT id="15"><DD>
|
||
Overrides
|
||
/etc/login.defs
|
||
defaults (<B>UID_MIN</B>,
|
||
<B>UID_MAX</B>,
|
||
<B>UMASK</B>,
|
||
<B>PASS_MAX_DAYS</B>
|
||
and others).
|
||
<P>
|
||
Example:
|
||
<B>-K</B> <I>PASS_MAX_DAYS</I>=<I>-1</I>
|
||
can be used when creating system account to turn off password aging, even though system account has no password at all. Multiple
|
||
<B>-K</B>
|
||
options can be specified, e.g.:
|
||
<B>-K</B> <I>UID_MIN</I>=<I>100</I>
|
||
<B>-K</B> <I>UID_MAX</I>=<I>499</I>
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-l</B>, <B>--no-log-init</B>
|
||
<DL COMPACT><DT id="16"><DD>
|
||
Не добавлять пользователя в базы данных lastlog и faillog.
|
||
<P>
|
||
By default, the user's entries in the lastlog and faillog databases are reset to avoid reusing the entry from a previously deleted user.
|
||
<P>
|
||
For the compatibility with previous Debian's
|
||
<B>useradd</B>, the
|
||
<B>-O</B>
|
||
option is also supported.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-m</B>, <B>--create-home</B>
|
||
<DL COMPACT><DT id="17"><DD>
|
||
Create the user's home directory if it does not exist. The files and directories contained in the skeleton directory (which can be defined with the
|
||
<B>-k</B>
|
||
option) will be copied to the home directory.
|
||
<P>
|
||
By default, if this option is not specified and
|
||
<B>CREATE_HOME</B>
|
||
is not enabled, no home directories are created.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-M</B>, <B>--no-create-home</B>
|
||
<DL COMPACT><DT id="18"><DD>
|
||
Do no create the user's home directory, even if the system wide setting from
|
||
/etc/login.defs
|
||
(<B>CREATE_HOME</B>) is set to
|
||
<I>yes</I>.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-N</B>, <B>--no-user-group</B>
|
||
<DL COMPACT><DT id="19"><DD>
|
||
Do not create a group with the same name as the user, but add the user to the group specified by the
|
||
<B>-g</B>
|
||
option or by the
|
||
<B>GROUP</B>
|
||
variable in
|
||
/etc/default/useradd.
|
||
<P>
|
||
The default behavior (if the
|
||
<B>-g</B>,
|
||
<B>-N</B>, and
|
||
<B>-U</B>
|
||
options are not specified) is defined by the
|
||
<B>USERGROUPS_ENAB</B>
|
||
variable in
|
||
/etc/login.defs.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-o</B>, <B>--non-unique</B>
|
||
<DL COMPACT><DT id="20"><DD>
|
||
Разрешить создание учётной записи с уже имеющимся (не уникальным) UID.
|
||
<P>
|
||
This option is only valid in combination with the
|
||
<B>-u</B>
|
||
option.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-p</B>, <B>--password</B> <I>PASSWORD</I>
|
||
<DL COMPACT><DT id="21"><DD>
|
||
The encrypted password, as returned by
|
||
<B><A HREF="/cgi-bin/man/man2html?3+crypt">crypt</A></B>(3). The default is to disable the password.
|
||
<P>
|
||
<B>Note:</B>
|
||
This option is not recommended because the password (or encrypted password) will be visible by users listing the processes.
|
||
<P>
|
||
Вы должны проверить, что пароль соответствует политике системных паролей.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-r</B>, <B>--system</B>
|
||
<DL COMPACT><DT id="22"><DD>
|
||
Создать системную учётную запись.
|
||
<P>
|
||
System users will be created with no aging information in
|
||
/etc/shadow, and their numeric identifiers are chosen in the
|
||
<B>SYS_UID_MIN</B>-<B>SYS_UID_MAX</B>
|
||
range, defined in
|
||
/etc/login.defs, instead of
|
||
<B>UID_MIN</B>-<B>UID_MAX</B>
|
||
(and their
|
||
<B>GID</B>
|
||
counterparts for the creation of groups).
|
||
<P>
|
||
Note that
|
||
<B>useradd</B>
|
||
will not create a home directory for such a user, regardless of the default setting in
|
||
/etc/login.defs
|
||
(<B>CREATE_HOME</B>). You have to specify the
|
||
<B>-m</B>
|
||
options if you want a home directory for a system account to be created.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-R</B>, <B>--root</B> <I>CHROOT_DIR</I>
|
||
<DL COMPACT><DT id="23"><DD>
|
||
Apply changes in the
|
||
<I>CHROOT_DIR</I>
|
||
directory and use the configuration files from the
|
||
<I>CHROOT_DIR</I>
|
||
directory.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-P</B>, <B>--prefix</B> <I>PREFIX_DIR</I>
|
||
<DL COMPACT><DT id="24"><DD>
|
||
Apply changes in the
|
||
<I>PREFIX_DIR</I>
|
||
directory and use the configuration files from the
|
||
<I>PREFIX_DIR</I>
|
||
directory. This option does not chroot and is intended for preparing a cross-compilation target. Some limitations: NIS and LDAP users/groups are not verified. PAM authentication is using the host files. No SELINUX support.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-s</B>, <B>--shell</B> <I>SHELL</I>
|
||
<DL COMPACT><DT id="25"><DD>
|
||
The name of the user's login shell. The default is to leave this field blank, which causes the system to select the default login shell specified by the
|
||
<B>SHELL</B>
|
||
variable in
|
||
/etc/default/useradd, or an empty string by default.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-u</B>, <B>--uid</B> <I>UID</I>
|
||
<DL COMPACT><DT id="26"><DD>
|
||
The numerical value of the user's ID. This value must be unique, unless the
|
||
<B>-o</B>
|
||
option is used. The value must be non-negative. The default is to use the smallest ID value greater than or equal to
|
||
<B>UID_MIN</B>
|
||
and greater than every other user.
|
||
<P>
|
||
See also the
|
||
<B>-r</B>
|
||
option and the
|
||
<B>UID_MAX</B>
|
||
description.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-U</B>, <B>--user-group</B>
|
||
<DL COMPACT><DT id="27"><DD>
|
||
Создать группу с тем же именем что и у пользователя, и добавить пользователя в эту группу.
|
||
<P>
|
||
The default behavior (if the
|
||
<B>-g</B>,
|
||
<B>-N</B>, and
|
||
<B>-U</B>
|
||
options are not specified) is defined by the
|
||
<B>USERGROUPS_ENAB</B>
|
||
variable in
|
||
/etc/login.defs.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-Z</B>, <B>--selinux-user</B> <I>SEUSER</I>
|
||
<DL COMPACT><DT id="28"><DD>
|
||
Пользователь SELinux для регистрационной оболочки пользователя. По умолчанию это поле пусто, что заставляет систему выбрать пользователя SELinux по умолчанию.
|
||
</DL>
|
||
|
||
<A NAME="lbAF"> </A>
|
||
<H3>Изменение значений по умолчанию</H3>
|
||
|
||
<P>
|
||
|
||
When invoked with only the
|
||
<B>-D</B>
|
||
option,
|
||
<B>useradd</B>
|
||
will display the current default values. When invoked with
|
||
<B>-D</B>
|
||
plus other options,
|
||
<B>useradd</B>
|
||
will update the default values for the specified options. Valid default-changing options are:
|
||
<P>
|
||
|
||
<B>-b</B>, <B>--base-dir</B> <I>BASE_DIR</I>
|
||
<DL COMPACT><DT id="29"><DD>
|
||
The path prefix for a new user's home directory. The user's name will be affixed to the end of
|
||
<I>BASE_DIR</I>
|
||
to form the new user's home directory name, if the
|
||
<B>-d</B>
|
||
option is not used when creating a new account.
|
||
<P>
|
||
This option sets the
|
||
<B>HOME</B>
|
||
variable in
|
||
/etc/default/useradd.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-e</B>, <B>--expiredate</B> <I>EXPIRE_DATE</I>
|
||
<DL COMPACT><DT id="30"><DD>
|
||
Дата, когда учётная запись пользователя заблокирована.
|
||
<P>
|
||
This option sets the
|
||
<B>EXPIRE</B>
|
||
variable in
|
||
/etc/default/useradd.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-f</B>, <B>--inactive</B> <I>INACTIVE</I>
|
||
<DL COMPACT><DT id="31"><DD>
|
||
Число дней, которые должны пройти после устаревания пароля, перед тем как учётная запись будет заблокирована.
|
||
<P>
|
||
This option sets the
|
||
<B>INACTIVE</B>
|
||
variable in
|
||
/etc/default/useradd.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-g</B>, <B>--gid</B> <I>GROUP</I>
|
||
<DL COMPACT><DT id="32"><DD>
|
||
The group name or ID for a new user's initial group (when the
|
||
<B>-N/--no-user-group</B>
|
||
is used or when the
|
||
<B>USERGROUPS_ENAB</B>
|
||
variable is set to
|
||
<I>no</I>
|
||
in
|
||
/etc/login.defs). The named group must exist, and a numerical group ID must have an existing entry.
|
||
<P>
|
||
This option sets the
|
||
<B>GROUP</B>
|
||
variable in
|
||
/etc/default/useradd.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-s</B>, <B>--shell</B> <I>SHELL</I>
|
||
<DL COMPACT><DT id="33"><DD>
|
||
Имя новой регистрационной командной оболочки пользователя.
|
||
<P>
|
||
This option sets the
|
||
<B>SHELL</B>
|
||
variable in
|
||
/etc/default/useradd.
|
||
</DL>
|
||
|
||
<A NAME="lbAG"> </A>
|
||
<H2>ЗАМЕЧАНИЯ</H2>
|
||
|
||
<P>
|
||
|
||
The system administrator is responsible for placing the default user files in the
|
||
/etc/skel/
|
||
directory (or any other skeleton directory specified in
|
||
/etc/default/useradd
|
||
or on the command line).
|
||
<A NAME="lbAH"> </A>
|
||
<H2>ПРЕДОСТЕРЕЖЕНИЯ</H2>
|
||
|
||
<P>
|
||
|
||
Нельзя добавить пользователя в группу NIS или LDAP. Это необходимо делать на соответствующем сервере.
|
||
<P>
|
||
|
||
Similarly, if the username already exists in an external user database such as NIS or LDAP,
|
||
<B>useradd</B>
|
||
will deny the user account creation request.
|
||
<P>
|
||
|
||
It is usually recommended to only use usernames that begin with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes. They can end with a dollar sign. In regular expression terms: [a-z_][a-z0-9_-]*[$]?
|
||
<P>
|
||
|
||
On Debian, the only constraints are that usernames must neither start with a dash ('-') nor plus ('+') nor tilde ('~') nor contain a colon (':'), a comma (','), or a whitespace (space: ' ', end of line: '\n', tabulation: '\t', etc.). Note that using a slash ('/') may break the default algorithm for the definition of the user's home directory.
|
||
<P>
|
||
|
||
Имена пользователей могут быть длиной не более 32 знаков.
|
||
<A NAME="lbAI"> </A>
|
||
<H2>НАСТРОЙКА</H2>
|
||
|
||
<P>
|
||
|
||
The following configuration variables in
|
||
/etc/login.defs
|
||
change the behavior of this tool:
|
||
<P>
|
||
|
||
<B>CREATE_HOME</B> (boolean)
|
||
<DL COMPACT><DT id="34"><DD>
|
||
Определяет, должен ли создаваться по умолчанию домашний каталог для новых пользователей.
|
||
<P>
|
||
Эта переменная не влияет на системных пользователей и может быть переопределена из командной строки.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>GID_MAX</B> (number), <B>GID_MIN</B> (number)
|
||
<DL COMPACT><DT id="35"><DD>
|
||
Range of group IDs used for the creation of regular groups by
|
||
<B>useradd</B>,
|
||
<B>groupadd</B>, or
|
||
<B>newusers</B>.
|
||
<P>
|
||
The default value for
|
||
<B>GID_MIN</B>
|
||
(resp.
|
||
<B>GID_MAX</B>) is 1000 (resp. 60000).
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>HOME_MODE</B> (number)
|
||
<DL COMPACT><DT id="36"><DD>
|
||
The mode for new home directories. If not specified, the
|
||
<B>UMASK</B>
|
||
is used to create the mode.
|
||
<P>
|
||
<B>useradd</B>
|
||
and
|
||
<B>newusers</B>
|
||
use this to set the mode of the home directory they create.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>LASTLOG_UID_MAX</B> (number)
|
||
<DL COMPACT><DT id="37"><DD>
|
||
Highest user ID number for which the lastlog entries should be updated. As higher user IDs are usually tracked by remote user identity and authentication services there is no need to create a huge sparse lastlog file for them.
|
||
<P>
|
||
No
|
||
<B>LASTLOG_UID_MAX</B>
|
||
option present in the configuration means that there is no user ID limit for writing lastlog entries.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>MAIL_DIR</B> (string)
|
||
<DL COMPACT><DT id="38"><DD>
|
||
Почтовый каталог. Данный параметр нужен для управления почтовым ящиком при изменении или удалении учётной записи пользователя. Если параметр не задан, то используется значение указанное при сборке.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>MAIL_FILE</B> (string)
|
||
<DL COMPACT><DT id="39"><DD>
|
||
Определяет расположение почтовых файлов пользователя относительно домашнего каталога.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
The
|
||
<B>MAIL_DIR</B>
|
||
and
|
||
<B>MAIL_FILE</B>
|
||
variables are used by
|
||
<B>useradd</B>,
|
||
<B>usermod</B>, and
|
||
<B>userdel</B>
|
||
to create, move, or delete the user's mail spool.
|
||
<P>
|
||
|
||
<B>MAX_MEMBERS_PER_GROUP</B> (number)
|
||
<DL COMPACT><DT id="40"><DD>
|
||
Maximum members per group entry. When the maximum is reached, a new group entry (line) is started in
|
||
/etc/group
|
||
(with the same name, same password, and same GID).
|
||
<P>
|
||
Значение по умолчанию равно 0, означающее, что ограничения на количество членов в группе нет.
|
||
<P>
|
||
Данная возможность (разделение группы) позволяет ограничить длину строк в файле групп. Это полезно для ограничения длины строк групп NIS в 1024 символа.
|
||
<P>
|
||
Если вам нужно такое ограничение, укажите значение 25.
|
||
<P>
|
||
Замечание: разделение групп поддерживается не всеми инструментами (даже в наборе инструментов Shadow). Вы не должны использовать эту переменную, если вам действительно это ненужно.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>PASS_MAX_DAYS</B> (number)
|
||
<DL COMPACT><DT id="41"><DD>
|
||
Максимальное число дней использования пароля. Если пароль старее этого числа, то будет запущена процедура смены пароля. Если значение не задано, то предполагается значение -1 (то есть возможность ограничения не используется).
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>PASS_MIN_DAYS</B> (number)
|
||
<DL COMPACT><DT id="42"><DD>
|
||
Максимальное число дней между изменениями пароля. Любая смена пароля ранее заданного срока выполнена не будет. Если значение не задано, то предполагается значение -1 (то есть возможность ограничения не используется).
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>PASS_WARN_AGE</B> (number)
|
||
<DL COMPACT><DT id="43"><DD>
|
||
Число дней за которое начнёт выдаваться предупреждение об устаревании пароля. Нулевое значение означает, что предупреждение выдаётся в день устаревания, при отрицательном значении предупреждение выдаваться не будет. Если значение не задано, выдача предупреждения отключается.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>SUB_GID_MIN</B> (number), <B>SUB_GID_MAX</B> (number), <B>SUB_GID_COUNT</B> (number)
|
||
<DL COMPACT><DT id="44"><DD>
|
||
If
|
||
/etc/subuid
|
||
exists, the commands
|
||
<B>useradd</B>
|
||
and
|
||
<B>newusers</B>
|
||
(unless the user already have subordinate group IDs) allocate
|
||
<B>SUB_GID_COUNT</B>
|
||
unused group IDs from the range
|
||
<B>SUB_GID_MIN</B>
|
||
to
|
||
<B>SUB_GID_MAX</B>
|
||
for each new user.
|
||
<P>
|
||
The default values for
|
||
<B>SUB_GID_MIN</B>,
|
||
<B>SUB_GID_MAX</B>,
|
||
<B>SUB_GID_COUNT</B>
|
||
are respectively 100000, 600100000 and 65536.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>SUB_UID_MIN</B> (number), <B>SUB_UID_MAX</B> (number), <B>SUB_UID_COUNT</B> (number)
|
||
<DL COMPACT><DT id="45"><DD>
|
||
If
|
||
/etc/subuid
|
||
exists, the commands
|
||
<B>useradd</B>
|
||
and
|
||
<B>newusers</B>
|
||
(unless the user already have subordinate user IDs) allocate
|
||
<B>SUB_UID_COUNT</B>
|
||
unused user IDs from the range
|
||
<B>SUB_UID_MIN</B>
|
||
to
|
||
<B>SUB_UID_MAX</B>
|
||
for each new user.
|
||
<P>
|
||
The default values for
|
||
<B>SUB_UID_MIN</B>,
|
||
<B>SUB_UID_MAX</B>,
|
||
<B>SUB_UID_COUNT</B>
|
||
are respectively 100000, 600100000 and 65536.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>SYS_GID_MAX</B> (number), <B>SYS_GID_MIN</B> (number)
|
||
<DL COMPACT><DT id="46"><DD>
|
||
Range of group IDs used for the creation of system groups by
|
||
<B>useradd</B>,
|
||
<B>groupadd</B>, or
|
||
<B>newusers</B>.
|
||
<P>
|
||
The default value for
|
||
<B>SYS_GID_MIN</B>
|
||
(resp.
|
||
<B>SYS_GID_MAX</B>) is 101 (resp.
|
||
<B>GID_MIN</B>-1).
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>SYS_UID_MAX</B> (number), <B>SYS_UID_MIN</B> (number)
|
||
<DL COMPACT><DT id="47"><DD>
|
||
Range of user IDs used for the creation of system users by
|
||
<B>useradd</B>
|
||
or
|
||
<B>newusers</B>.
|
||
<P>
|
||
The default value for
|
||
<B>SYS_UID_MIN</B>
|
||
(resp.
|
||
<B>SYS_UID_MAX</B>) is 101 (resp.
|
||
<B>UID_MIN</B>-1).
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>UID_MAX</B> (number), <B>UID_MIN</B> (number)
|
||
<DL COMPACT><DT id="48"><DD>
|
||
Range of user IDs used for the creation of regular users by
|
||
<B>useradd</B>
|
||
or
|
||
<B>newusers</B>.
|
||
<P>
|
||
The default value for
|
||
<B>UID_MIN</B>
|
||
(resp.
|
||
<B>UID_MAX</B>) is 1000 (resp. 60000).
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>UMASK</B> (number)
|
||
<DL COMPACT><DT id="49"><DD>
|
||
Задаёт начальное значение маски доступа для создаваемых файлов. Если не указано, то маска устанавливается в 022.
|
||
<P>
|
||
<B>useradd</B>
|
||
and
|
||
<B>newusers</B>
|
||
use this mask to set the mode of the home directory they create if
|
||
<B>HOME_MODE</B>
|
||
is not set.
|
||
<P>
|
||
It is also used by
|
||
<B>pam_umask</B>
|
||
as the default umask value.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>USERGROUPS_ENAB</B> (boolean)
|
||
<DL COMPACT><DT id="50"><DD>
|
||
If set to
|
||
<I>yes</I>,
|
||
<B>userdel</B>
|
||
will remove the user's group if it contains no more members, and
|
||
<B>useradd</B>
|
||
will create by default a group with the name of the user.
|
||
</DL>
|
||
|
||
<A NAME="lbAJ"> </A>
|
||
<H2>ФАЙЛЫ</H2>
|
||
|
||
<P>
|
||
|
||
/etc/passwd
|
||
<DL COMPACT><DT id="51"><DD>
|
||
содержит информацию о пользователях
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
/etc/shadow
|
||
<DL COMPACT><DT id="52"><DD>
|
||
содержит защищаемую информацию о пользователях
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
/etc/group
|
||
<DL COMPACT><DT id="53"><DD>
|
||
содержит информацию о группах
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
/etc/gshadow
|
||
<DL COMPACT><DT id="54"><DD>
|
||
содержит защищаемую информацию о группах
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
/etc/default/useradd
|
||
<DL COMPACT><DT id="55"><DD>
|
||
значения по умолчанию для создаваемой учётной записи
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
/etc/skel/
|
||
<DL COMPACT><DT id="56"><DD>
|
||
каталог, содержащий файлы по умолчанию
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
/etc/subgid
|
||
<DL COMPACT><DT id="57"><DD>
|
||
Per user subordinate group IDs.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
/etc/subuid
|
||
<DL COMPACT><DT id="58"><DD>
|
||
Per user subordinate user IDs.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
/etc/login.defs
|
||
<DL COMPACT><DT id="59"><DD>
|
||
содержит конфигурацию подсистемы теневых паролей
|
||
</DL>
|
||
|
||
<A NAME="lbAK"> </A>
|
||
<H2>ВОЗВРАЩАЕМЫЕ ЗНАЧЕНИЯ</H2>
|
||
|
||
<P>
|
||
|
||
The
|
||
<B>useradd</B>
|
||
command exits with the following values:
|
||
<P>
|
||
|
||
<I>0</I>
|
||
<DL COMPACT><DT id="60"><DD>
|
||
success
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<I>1</I>
|
||
<DL COMPACT><DT id="61"><DD>
|
||
can't update password file
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<I>2</I>
|
||
<DL COMPACT><DT id="62"><DD>
|
||
invalid command syntax
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<I>3</I>
|
||
<DL COMPACT><DT id="63"><DD>
|
||
invalid argument to option
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<I>4</I>
|
||
<DL COMPACT><DT id="64"><DD>
|
||
UID already in use (and no
|
||
<B>-o</B>)
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<I>6</I>
|
||
<DL COMPACT><DT id="65"><DD>
|
||
specified group doesn't exist
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<I>9</I>
|
||
<DL COMPACT><DT id="66"><DD>
|
||
username already in use
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<I>10</I>
|
||
<DL COMPACT><DT id="67"><DD>
|
||
can't update group file
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<I>12</I>
|
||
<DL COMPACT><DT id="68"><DD>
|
||
can't create home directory
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<I>14</I>
|
||
<DL COMPACT><DT id="69"><DD>
|
||
can't update SELinux user mapping
|
||
</DL>
|
||
|
||
<A NAME="lbAL"> </A>
|
||
<H2>СМОТРИТЕ ТАКЖЕ</H2>
|
||
|
||
<P>
|
||
|
||
<B><A HREF="/cgi-bin/man/man2html?1+chfn">chfn</A></B>(1),
|
||
<B><A HREF="/cgi-bin/man/man2html?1+chsh">chsh</A></B>(1),
|
||
<B><A HREF="/cgi-bin/man/man2html?1+passwd">passwd</A></B>(1),
|
||
<B><A HREF="/cgi-bin/man/man2html?3+crypt">crypt</A></B>(3),
|
||
<B><A HREF="/cgi-bin/man/man2html?8+groupadd">groupadd</A></B>(8),
|
||
<B><A HREF="/cgi-bin/man/man2html?8+groupdel">groupdel</A></B>(8),
|
||
<B><A HREF="/cgi-bin/man/man2html?8+groupmod">groupmod</A></B>(8),
|
||
<B><A HREF="/cgi-bin/man/man2html?5+login.defs">login.defs</A></B>(5),
|
||
<B><A HREF="/cgi-bin/man/man2html?8+newusers">newusers</A></B>(8),
|
||
<B><A HREF="/cgi-bin/man/man2html?5+subgid">subgid</A></B>(5), <B><A HREF="/cgi-bin/man/man2html?5+subuid">subuid</A></B>(5),
|
||
<B><A HREF="/cgi-bin/man/man2html?8+userdel">userdel</A></B>(8),
|
||
<B><A HREF="/cgi-bin/man/man2html?8+usermod">usermod</A></B>(8).
|
||
<P>
|
||
|
||
<HR>
|
||
<A NAME="index"> </A><H2>Index</H2>
|
||
<DL>
|
||
<DT id="70"><A HREF="#lbAB">НАЗВАНИЕ</A><DD>
|
||
<DT id="71"><A HREF="#lbAC">СИНТАКСИС</A><DD>
|
||
<DT id="72"><A HREF="#lbAD">ОПИСАНИЕ</A><DD>
|
||
<DT id="73"><A HREF="#lbAE">ПАРАМЕТРЫ</A><DD>
|
||
<DL>
|
||
<DT id="74"><A HREF="#lbAF">Изменение значений по умолчанию</A><DD>
|
||
</DL>
|
||
<DT id="75"><A HREF="#lbAG">ЗАМЕЧАНИЯ</A><DD>
|
||
<DT id="76"><A HREF="#lbAH">ПРЕДОСТЕРЕЖЕНИЯ</A><DD>
|
||
<DT id="77"><A HREF="#lbAI">НАСТРОЙКА</A><DD>
|
||
<DT id="78"><A HREF="#lbAJ">ФАЙЛЫ</A><DD>
|
||
<DT id="79"><A HREF="#lbAK">ВОЗВРАЩАЕМЫЕ ЗНАЧЕНИЯ</A><DD>
|
||
<DT id="80"><A HREF="#lbAL">СМОТРИТЕ ТАКЖЕ</A><DD>
|
||
</DL>
|
||
<HR>
|
||
This document was created by
|
||
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
||
using the manual pages.<BR>
|
||
Time: 00:06:23 GMT, March 31, 2021
|
||
</BODY>
|
||
</HTML>
|