Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / pwconv.8.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 1996 - 1998, Marek Michałkiewicz
4    Copyright (c) 2000 - 2006, Tomasz Kłoczko
5    Copyright (c) 2007 - 2008, Nicolas François
6    All rights reserved.
7   
8    Redistribution and use in source and binary forms, with or without
9    modification, are permitted provided that the following conditions
10    are met:
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.
19   
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.
31 -->
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">
38 ]>
39 <refentry id='pwconv.8'>
40   <!-- $Id: pwconv.8.xml 2435 2008-10-11 11:44:43Z nekral-guest $ -->
41   <refmeta>
42     <refentrytitle>pwconv</refentrytitle>
43     <manvolnum>8</manvolnum>
44     <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
45   </refmeta>
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>
52   </refnamediv>
53
54   <refsynopsisdiv id='synopsis'>
55     <cmdsynopsis>
56       <command>pwconv</command>
57     </cmdsynopsis>
58     <cmdsynopsis>
59       <command>pwunconv</command>
60     </cmdsynopsis>
61     <cmdsynopsis>
62       <command>grpconv</command>
63     </cmdsynopsis>
64     <cmdsynopsis>
65       <command>grpunconv</command>
66     </cmdsynopsis>
67   </refsynopsisdiv>
68
69   <refsect1 id='description'>
70     <title>DESCRIPTION</title>
71     <para>
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>.
75     </para>
76
77     <para>
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>.
82     </para>
83
84     <para>
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>.
88     </para>
89
90     <para>
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>.
95     </para>
96
97     <para>
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>.
102     </para>
103
104     <para>
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.
113     </para>
114
115     <para>
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>.
122     </para>
123
124     <para>
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.
131     </para>
132   </refsect1>
133
134   <refsect1 id='bugs'>
135     <title>BUGS</title>
136     <para>
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.
142     </para>
143   </refsect1>
144
145   <refsect1 id='configuration'>
146     <title>CONFIGURATION</title>
147     <para>
148       The following configuration variable in
149       <filename>/etc/login.defs</filename> changes the behavior of
150       <command>grpconv</command> and <command>grpunconv</command>:
151     </para>
152     <variablelist>
153       &MAX_MEMBERS_PER_GROUP;
154     </variablelist>
155     <para>
156       The following configuration variables in
157       <filename>/etc/login.defs</filename> change the behavior of
158       <command>pwconv</command>:
159     </para>
160     <variablelist>
161       &PASS_MAX_DAYS;
162       &PASS_MIN_DAYS;
163       &PASS_WARN_AGE;
164     </variablelist>
165   </refsect1>
166
167   <refsect1 id='files'>
168     <title>FILES</title>
169     <variablelist>
170       <varlistentry>
171         <term><filename>/etc/login.defs</filename></term>
172         <listitem>
173           <para>Shadow password suite configuration.</para>
174         </listitem>
175       </varlistentry>
176     </variablelist>
177   </refsect1>
178
179   <refsect1 id='see_also'>
180     <title>SEE ALSO</title>
181     <para>
182       <citerefentry>
183         <refentrytitle>grpck</refentrytitle><manvolnum>8</manvolnum>
184       </citerefentry>,
185       <citerefentry>
186         <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
187       </citerefentry>,
188       <citerefentry>
189         <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
190       </citerefentry>.
191     </para>
192   </refsect1>
193 </refentry>