1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 1996 - 1998, Marek Michałkiewicz
4 Copyright (c) 2000 - 2006, Tomasz Kłoczko
5 Copyright (c) 2007 - 2008, Nicolas François
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions
11 1. Redistributions of source code must retain the above copyright
12 notice, this list of conditions and the following disclaimer.
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
16 3. The name of the copyright holders or contributors may not be used to
17 endorse or promote products derived from this software without
18 specific prior written permission.
20 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
23 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
33 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
34 <!ENTITY MAX_MEMBERS_PER_GROUP SYSTEM "login.defs.d/MAX_MEMBERS_PER_GROUP.xml">
35 <!ENTITY PASS_MAX_DAYS SYSTEM "login.defs.d/PASS_MAX_DAYS.xml">
36 <!ENTITY PASS_MIN_DAYS SYSTEM "login.defs.d/PASS_MIN_DAYS.xml">
37 <!ENTITY PASS_WARN_AGE SYSTEM "login.defs.d/PASS_WARN_AGE.xml">
39 <refentry id='pwconv.8'>
40 <!-- $Id: pwconv.8.xml 2435 2008-10-11 11:44:43Z nekral-guest $ -->
42 <refentrytitle>pwconv</refentrytitle>
43 <manvolnum>8</manvolnum>
44 <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
46 <refnamediv id='name'>
47 <refname>pwconv</refname>
48 <refname>pwunconv</refname>
49 <refname>grpconv</refname>
50 <refname>grpunconv</refname>
51 <refpurpose>convert to and from shadow passwords and groups</refpurpose>
54 <refsynopsisdiv id='synopsis'>
56 <command>pwconv</command>
59 <command>pwunconv</command>
62 <command>grpconv</command>
65 <command>grpunconv</command>
69 <refsect1 id='description'>
70 <title>DESCRIPTION</title>
72 The <command>pwconv</command> command creates <emphasis
73 remap='I'>shadow</emphasis> from <emphasis remap='I'>passwd</emphasis>
74 and an optionally existing <emphasis remap='I'>shadow</emphasis>.
78 The <command>pwunconv</command> command creates <emphasis
79 remap='I'>passwd</emphasis> from <emphasis remap='I'>passwd</emphasis>
80 and <emphasis remap='I'>shadow</emphasis> and then removes <emphasis
81 remap='I'>shadow</emphasis>.
85 The <command>grpconv</command> command creates <emphasis
86 remap='I'>gshadow</emphasis> from <emphasis remap='I'>group</emphasis>
87 and an optionally existing <emphasis remap='I'>gshadow</emphasis>.
91 The <command>grpunconv</command> command creates <emphasis
92 remap='I'>group</emphasis> from <emphasis remap='I'>group</emphasis>
93 and <emphasis remap='I'>gshadow</emphasis> and then removes <emphasis
94 remap='I'>gshadow</emphasis>.
98 These four programs all operate on the normal and shadow password and
99 group files: <filename>/etc/passwd</filename>,
100 <filename>/etc/group</filename>, <filename>/etc/shadow</filename>, and
101 <filename>/etc/gshadow</filename>.
105 Each program acquires the necessary locks before conversion.
106 <command>pwconv</command> and <command>grpconv</command> are similar.
107 First, entries in the shadowed file which don't exist in the main file
108 are removed. Then, shadowed entries which don't have `x' as the
109 password in the main file are updated. Any missing shadowed entries
110 are added. Finally, passwords in the main file are replaced with `x'.
111 These programs can be used for initial conversion as well to update
112 the shadowed file if the main file is edited by hand.
116 <command>pwconv</command> will use the values of <emphasis
117 remap='I'>PASS_MIN_DAYS</emphasis>, <emphasis
118 remap='I'>PASS_MAX_DAYS</emphasis>, and <emphasis
119 remap='I'>PASS_WARN_AGE</emphasis> from
120 <filename>/etc/login.defs</filename> when adding new entries to
121 <filename>/etc/shadow</filename>.
125 Likewise <command>pwunconv</command> and <command>grpunconv</command>
126 are similar. Passwords in the main file are updated from the shadowed
127 file. Entries which exist in the main file but not in the shadowed
128 file are left alone. Finally, the shadowed file is removed. Some
129 password aging information is lost by <command>pwunconv</command>. It
130 will convert what it can.
137 Errors in the password or group files (such as invalid or duplicate
138 entries) may cause these programs to loop forever or fail in other
139 strange ways. Please run <command>pwck</command> and
140 <command>grpck</command> to correct any such errors before converting
141 to or from shadow passwords or groups.
145 <refsect1 id='configuration'>
146 <title>CONFIGURATION</title>
148 The following configuration variable in
149 <filename>/etc/login.defs</filename> changes the behavior of
150 <command>grpconv</command> and <command>grpunconv</command>:
153 &MAX_MEMBERS_PER_GROUP;
156 The following configuration variables in
157 <filename>/etc/login.defs</filename> change the behavior of
158 <command>pwconv</command>:
167 <refsect1 id='files'>
171 <term><filename>/etc/login.defs</filename></term>
173 <para>Shadow password suite configuration.</para>
179 <refsect1 id='see_also'>
180 <title>SEE ALSO</title>
183 <refentrytitle>grpck</refentrytitle><manvolnum>8</manvolnum>
186 <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
189 <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>