259 lines
7.3 KiB
HTML
259 lines
7.3 KiB
HTML
|
||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<HTML><HEAD><TITLE>Man page of pwconv</TITLE>
|
||
</HEAD><BODY>
|
||
<H1>pwconv</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>
|
||
|
||
pwconv, pwunconv, grpconv, grpunconv - преобразует пароли пользователей и групп в/из защищённую форму
|
||
<A NAME="lbAC"> </A>
|
||
<H2>СИНТАКСИС</H2>
|
||
|
||
<DL COMPACT>
|
||
<DT id="1">
|
||
<B>pwconv</B> [<I>параметры</I>]
|
||
<DT id="2">
|
||
<B>pwunconv</B> [<I>параметры</I>]
|
||
<DT id="3">
|
||
<B>grpconv</B> [<I>параметры</I>]
|
||
<DT id="4">
|
||
<B>grpunconv</B> [<I>параметры</I>]
|
||
</DL>
|
||
<A NAME="lbAD"> </A>
|
||
<H2>ОПИСАНИЕ</H2>
|
||
|
||
<P>
|
||
|
||
<DD>The
|
||
<B>pwconv</B>
|
||
command creates
|
||
<I>shadow</I>
|
||
from
|
||
<I>passwd</I>
|
||
and an optionally existing
|
||
<I>shadow</I>.
|
||
<P>
|
||
|
||
The
|
||
<B>pwunconv</B>
|
||
command creates
|
||
<I>passwd</I>
|
||
from
|
||
<I>passwd</I>
|
||
and
|
||
<I>shadow</I>
|
||
and then removes
|
||
<I>shadow</I>.
|
||
<P>
|
||
|
||
The
|
||
<B>grpconv</B>
|
||
command creates
|
||
<I>gshadow</I>
|
||
from
|
||
<I>group</I>
|
||
and an optionally existing
|
||
<I>gshadow</I>.
|
||
<P>
|
||
|
||
The
|
||
<B>grpunconv</B>
|
||
command creates
|
||
<I>group</I>
|
||
from
|
||
<I>group</I>
|
||
and
|
||
<I>gshadow</I>
|
||
and then removes
|
||
<I>gshadow</I>.
|
||
<P>
|
||
|
||
These four programs all operate on the normal and shadow password and group files:
|
||
/etc/passwd,
|
||
/etc/group,
|
||
/etc/shadow, and
|
||
/etc/gshadow.
|
||
<P>
|
||
|
||
Each program acquires the necessary locks before conversion.
|
||
<B>pwconv</B>
|
||
and
|
||
<B>grpconv</B>
|
||
are similar. First, entries in the shadowed file which don't exist in the main file are removed. Then, shadowed entries which don't have `x' as the password in the main file are updated. Any missing shadowed entries are added. Finally, passwords in the main file are replaced with `x'. These programs can be used for initial conversion as well to update the shadowed file if the main file is edited by hand.
|
||
<P>
|
||
|
||
<B>pwconv</B>
|
||
will use the values of
|
||
<I>PASS_MIN_DAYS</I>,
|
||
<I>PASS_MAX_DAYS</I>, and
|
||
<I>PASS_WARN_AGE</I>
|
||
from
|
||
/etc/login.defs
|
||
when adding new entries to
|
||
/etc/shadow.
|
||
<P>
|
||
|
||
Likewise
|
||
<B>pwunconv</B>
|
||
and
|
||
<B>grpunconv</B>
|
||
are similar. Passwords in the main file are updated from the shadowed file. Entries which exist in the main file but not in the shadowed file are left alone. Finally, the shadowed file is removed. Some password aging information is lost by
|
||
<B>pwunconv</B>. It will convert what it can.
|
||
<A NAME="lbAE"> </A>
|
||
<H2>ПАРАМЕТРЫ</H2>
|
||
|
||
<P>
|
||
|
||
The options which apply to the
|
||
<B>pwconv</B>,
|
||
<B>pwunconv</B>,
|
||
<B>grpconv</B>, and
|
||
<B>grpunconv</B>
|
||
commands are:
|
||
<P>
|
||
|
||
<B>-h</B>, <B>--help</B>
|
||
<DL COMPACT><DT id="5"><DD>
|
||
Показать краткую справку и закончить работу.
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>-R</B>, <B>--root</B> <I>CHROOT_DIR</I>
|
||
<DL COMPACT><DT id="6"><DD>
|
||
Apply changes in the
|
||
<I>CHROOT_DIR</I>
|
||
directory and use the configuration files from the
|
||
<I>CHROOT_DIR</I>
|
||
directory.
|
||
</DL>
|
||
|
||
<A NAME="lbAF"> </A>
|
||
<H2>ОШИБКИ РЕАЛИЗАЦИИ</H2>
|
||
|
||
<P>
|
||
|
||
Errors in the password or group files (such as invalid or duplicate entries) may cause these programs to loop forever or fail in other strange ways. Please run
|
||
<B>pwck</B>
|
||
and
|
||
<B>grpck</B>
|
||
to correct any such errors before converting to or from shadow passwords or groups.
|
||
<A NAME="lbAG"> </A>
|
||
<H2>НАСТРОЙКА</H2>
|
||
|
||
<P>
|
||
|
||
The following configuration variable in
|
||
/etc/login.defs
|
||
changes the behavior of
|
||
<B>grpconv</B>
|
||
and
|
||
<B>grpunconv</B>:
|
||
<P>
|
||
|
||
<B>MAX_MEMBERS_PER_GROUP</B> (number)
|
||
<DL COMPACT><DT id="7"><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>
|
||
|
||
The following configuration variables in
|
||
/etc/login.defs
|
||
change the behavior of
|
||
<B>pwconv</B>:
|
||
<P>
|
||
|
||
<B>PASS_MAX_DAYS</B> (number)
|
||
<DL COMPACT><DT id="8"><DD>
|
||
Максимальное число дней использования пароля. Если пароль старее этого числа, то будет запущена процедура смены пароля. Если значение не задано, то предполагается значение -1 (то есть возможность ограничения не используется).
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>PASS_MIN_DAYS</B> (number)
|
||
<DL COMPACT><DT id="9"><DD>
|
||
Максимальное число дней между изменениями пароля. Любая смена пароля ранее заданного срока выполнена не будет. Если значение не задано, то предполагается значение -1 (то есть возможность ограничения не используется).
|
||
</DL>
|
||
|
||
<P>
|
||
|
||
<B>PASS_WARN_AGE</B> (number)
|
||
<DL COMPACT><DT id="10"><DD>
|
||
Число дней за которое начнёт выдаваться предупреждение об устаревании пароля. Нулевое значение означает, что предупреждение выдаётся в день устаревания, при отрицательном значении предупреждение выдаваться не будет. Если значение не задано, выдача предупреждения отключается.
|
||
</DL>
|
||
|
||
<A NAME="lbAH"> </A>
|
||
<H2>ФАЙЛЫ</H2>
|
||
|
||
<P>
|
||
|
||
/etc/login.defs
|
||
<DL COMPACT><DT id="11"><DD>
|
||
содержит конфигурацию подсистемы теневых паролей
|
||
</DL>
|
||
|
||
<A NAME="lbAI"> </A>
|
||
<H2>СМОТРИТЕ ТАКЖЕ</H2>
|
||
|
||
<P>
|
||
|
||
<B><A HREF="/cgi-bin/man/man2html?8+grpck">grpck</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+pwck">pwck</A></B>(8).
|
||
<P>
|
||
|
||
<HR>
|
||
<A NAME="index"> </A><H2>Index</H2>
|
||
<DL>
|
||
<DT id="12"><A HREF="#lbAB">НАЗВАНИЕ</A><DD>
|
||
<DT id="13"><A HREF="#lbAC">СИНТАКСИС</A><DD>
|
||
<DT id="14"><A HREF="#lbAD">ОПИСАНИЕ</A><DD>
|
||
<DT id="15"><A HREF="#lbAE">ПАРАМЕТРЫ</A><DD>
|
||
<DT id="16"><A HREF="#lbAF">ОШИБКИ РЕАЛИЗАЦИИ</A><DD>
|
||
<DT id="17"><A HREF="#lbAG">НАСТРОЙКА</A><DD>
|
||
<DT id="18"><A HREF="#lbAH">ФАЙЛЫ</A><DD>
|
||
<DT id="19"><A HREF="#lbAI">СМОТРИТЕ ТАКЖЕ</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>
|