320 lines
9.8 KiB
HTML
320 lines
9.8 KiB
HTML
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<HTML><HEAD><TITLE>Man page of gpasswd</TITLE>
|
||
</HEAD><BODY>
|
||
<H1>gpasswd</H1>
|
||
Section: Пользовательские команды (1)<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>
|
||
|
||
gpasswd - administer /etc/group and /etc/gshadow
|
||
<A NAME="lbAC"> </A>
|
||
<H2>СИНТАКСИС</H2>
|
||
|
||
<DL COMPACT>
|
||
<DT id="1">
|
||
<B>gpasswd</B> [<I>параметр</I>] <I>группа</I>
|
||
</DL>
|
||
<A NAME="lbAD"> </A>
|
||
<H2>ОПИСАНИЕ</H2>
|
||
|
||
<P>
|
||
|
||
<DD>The
|
||
<B>gpasswd</B>
|
||
command is used to administer
|
||
/etc/group, and /etc/gshadow. Every group can have
|
||
administrators,
|
||
members and a password.
|
||
<P>
|
||
|
||
System administrators can use the
|
||
<B>-A</B>
|
||
option to define group administrator(s) and the
|
||
<B>-M</B>
|
||
option to define members. They have all rights of group administrators and members.
|
||
<P>
|
||
|
||
<B>gpasswd</B>
|
||
called by
|
||
a group administrator
|
||
with a group name only prompts for the new password of the
|
||
<I>group</I>.
|
||
<P>
|
||
|
||
If a password is set the members can still use
|
||
<B><A HREF="/cgi-bin/man/man2html?1+newgrp">newgrp</A></B>(1)
|
||
without a password, and non-members must supply the password.
|
||
<A NAME="lbAE"> </A>
|
||
<H3>Замечания о паролях групп</H3>
|
||
|
||
<P>
|
||
|
||
Пароли групп имеют врождённую проблему с безопасностью, так как пароль знает более одного человека. Однако, группы являются полезным инструментом совместной работы различных пользователей.
|
||
<A NAME="lbAF"> </A>
|
||
<H2>ПАРАМЕТРЫ</H2>
|
||
|
||
<P>
|
||
|
||
Except for the
|
||
<B>-A</B>
|
||
and
|
||
<B>-M</B>
|
||
options, the options cannot be combined.
|
||
<P>
|
||
|
||
The options which apply to the
|
||
<B>gpasswd</B>
|
||
command are:
|
||
<P>
|
||
|
||
<B>-a</B>, <B>--add</B> <I>user</I>
|
||
<DL COMPACT><DT id="2"><DD>
|
||
Add the
|
||
<I>user</I>
|
||
to the named
|
||
<I>group</I>.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-d</B>, <B>--delete</B> <I>user</I>
|
||
<DL COMPACT><DT id="3"><DD>
|
||
Remove the
|
||
<I>user</I>
|
||
from the named
|
||
<I>group</I>.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-h</B>, <B>--help</B>
|
||
<DL COMPACT><DT id="4"><DD>
|
||
Показать краткую справку и закончить работу.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-Q</B>, <B>--root</B> <I>CHROOT_DIR</I>
|
||
<DL COMPACT><DT id="5"><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>-r</B>, <B>--remove-password</B>
|
||
<DL COMPACT><DT id="6"><DD>
|
||
Remove the password from the named
|
||
<I>group</I>. The group password will be empty. Only group members will be allowed to use
|
||
<B>newgrp</B>
|
||
to join the named
|
||
<I>group</I>.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-R</B>, <B>--restrict</B>
|
||
<DL COMPACT><DT id="7"><DD>
|
||
Restrict the access to the named
|
||
<I>group</I>. The group password is set to "!". Only group members with a password will be allowed to use
|
||
<B>newgrp</B>
|
||
to join the named
|
||
<I>group</I>.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-A</B>, <B>--administrators</B> <I>user</I>,...
|
||
<DL COMPACT><DT id="8"><DD>
|
||
Задать список администраторов группы.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-M</B>, <B>--members</B> <I>user</I>,...
|
||
<DL COMPACT><DT id="9"><DD>
|
||
Задать список членов группы.
|
||
</DL>
|
||
|
||
<A NAME="lbAG"> </A>
|
||
<H2>ПРЕДОСТЕРЕЖЕНИЯ</H2>
|
||
|
||
<P>
|
||
|
||
This tool only operates on the
|
||
/etc/group
|
||
and /etc/gshadow files.
|
||
Thus you cannot change any NIS or LDAP group. This must be performed on the corresponding server.
|
||
<A NAME="lbAH"> </A>
|
||
<H2>НАСТРОЙКА</H2>
|
||
|
||
<P>
|
||
|
||
The following configuration variables in
|
||
/etc/login.defs
|
||
change the behavior of this tool:
|
||
<P>
|
||
|
||
<B>ENCRYPT_METHOD</B> (string)
|
||
<DL COMPACT><DT id="10"><DD>
|
||
Задаёт системный алгоритм шифрования по умолчанию для шифрования паролей (используется, если алгоритм не указан в командной строке).
|
||
<P>
|
||
It can take one of these values:
|
||
<I>DES</I>
|
||
(default),
|
||
<I>MD5</I>, <I>SHA256</I>, <I>SHA512</I>.
|
||
<P>
|
||
Note: this parameter overrides the
|
||
<B>MD5_CRYPT_ENAB</B>
|
||
variable.
|
||
<P>
|
||
Замечание: действует только при генерации паролей к группам. Генерация пользовательских паролей выполняется PAM и там же настраивается. Рекомендуется устанавливать значение этой переменной согласно настройкам PAM.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>MAX_MEMBERS_PER_GROUP</B> (number)
|
||
<DL COMPACT><DT id="11"><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>MD5_CRYPT_ENAB</B> (boolean)
|
||
<DL COMPACT><DT id="12"><DD>
|
||
Indicate if passwords must be encrypted using the MD5-based algorithm. If set to
|
||
<I>yes</I>, new passwords will be encrypted using the MD5-based algorithm compatible with the one used by recent releases of FreeBSD. It supports passwords of unlimited length and longer salt strings. Set to
|
||
<I>no</I>
|
||
if you need to copy encrypted passwords to other systems which don't understand the new algorithm. Default is
|
||
<I>no</I>.
|
||
<P>
|
||
This variable is superseded by the
|
||
<B>ENCRYPT_METHOD</B>
|
||
variable or by any command line option used to configure the encryption algorithm.
|
||
<P>
|
||
This variable is deprecated. You should use
|
||
<B>ENCRYPT_METHOD</B>.
|
||
<P>
|
||
Замечание: действует только при генерации паролей к группам. Генерация пользовательских паролей выполняется PAM и там же настраивается. Рекомендуется устанавливать значение этой переменной согласно настройкам PAM.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>SHA_CRYPT_MIN_ROUNDS</B> (number), <B>SHA_CRYPT_MAX_ROUNDS</B> (number)
|
||
<DL COMPACT><DT id="13"><DD>
|
||
When
|
||
<B>ENCRYPT_METHOD</B>
|
||
is set to
|
||
<I>SHA256</I>
|
||
or
|
||
<I>SHA512</I>, this defines the number of SHA rounds used by the encryption algorithm by default (when the number of rounds is not specified on the command line).
|
||
<P>
|
||
Увеличение количества раундов повышает сложность подбора пароля простым перебором. Но заметим, что при этом для аутентификации пользователей требуется большее количество процессорных ресурсов.
|
||
<P>
|
||
Если не задана, то libc выбирает значение количества раундов по умолчанию (5000).
|
||
<P>
|
||
Значения должны лежать в диапазоне 1000-999999999.
|
||
<P>
|
||
If only one of the
|
||
<B>SHA_CRYPT_MIN_ROUNDS</B>
|
||
or
|
||
<B>SHA_CRYPT_MAX_ROUNDS</B>
|
||
values is set, then this value will be used.
|
||
<P>
|
||
If
|
||
<B>SHA_CRYPT_MIN_ROUNDS</B>
|
||
>
|
||
<B>SHA_CRYPT_MAX_ROUNDS</B>, the highest value will be used.
|
||
<P>
|
||
Замечание: действует только при генерации паролей к группам. Генерация пользовательских паролей выполняется PAM и там же настраивается. Рекомендуется устанавливать значение этой переменной согласно настройкам PAM.
|
||
</DL>
|
||
|
||
<A NAME="lbAI"> </A>
|
||
<H2>ФАЙЛЫ</H2>
|
||
|
||
<P>
|
||
|
||
/etc/group
|
||
<DL COMPACT><DT id="14"><DD>
|
||
содержит информацию о группах
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
/etc/gshadow
|
||
<DL COMPACT><DT id="15"><DD>
|
||
содержит защищаемую информацию о группах
|
||
</DL>
|
||
|
||
<A NAME="lbAJ"> </A>
|
||
<H2>СМОТРИТЕ ТАКЖЕ</H2>
|
||
|
||
<P>
|
||
|
||
<B><A HREF="/cgi-bin/man/man2html?1+newgrp">newgrp</A></B>(1),
|
||
<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?8+grpck">grpck</A></B>(8),
|
||
<B><A HREF="/cgi-bin/man/man2html?5+group">group</A></B>(5), <B><A HREF="/cgi-bin/man/man2html?5+gshadow">gshadow</A></B>(5).
|
||
<P>
|
||
|
||
<HR>
|
||
<A NAME="index"> </A><H2>Index</H2>
|
||
<DL>
|
||
<DT id="16"><A HREF="#lbAB">НАЗВАНИЕ</A><DD>
|
||
<DT id="17"><A HREF="#lbAC">СИНТАКСИС</A><DD>
|
||
<DT id="18"><A HREF="#lbAD">ОПИСАНИЕ</A><DD>
|
||
<DL>
|
||
<DT id="19"><A HREF="#lbAE">Замечания о паролях групп</A><DD>
|
||
</DL>
|
||
<DT id="20"><A HREF="#lbAF">ПАРАМЕТРЫ</A><DD>
|
||
<DT id="21"><A HREF="#lbAG">ПРЕДОСТЕРЕЖЕНИЯ</A><DD>
|
||
<DT id="22"><A HREF="#lbAH">НАСТРОЙКА</A><DD>
|
||
<DT id="23"><A HREF="#lbAI">ФАЙЛЫ</A><DD>
|
||
<DT id="24"><A HREF="#lbAJ">СМОТРИТЕ ТАКЖЕ</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:22 GMT, March 31, 2021
|
||
</BODY>
|
||
</HTML>
|