Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / grpck.8.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 1992 - 1993, Julianne Frances Haugh
4    Copyright (c) 2007 - 2009, Nicolas François
5    All rights reserved.
6   
7    Redistribution and use in source and binary forms, with or without
8    modification, are permitted provided that the following conditions
9    are met:
10    1. Redistributions of source code must retain the above copyright
11       notice, this list of conditions and the following disclaimer.
12    2. Redistributions in binary form must reproduce the above copyright
13       notice, this list of conditions and the following disclaimer in the
14       documentation and/or other materials provided with the distribution.
15    3. The name of the copyright holders or contributors may not be used to
16       endorse or promote products derived from this software without
17       specific prior written permission.
18   
19    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22    PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
23    HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 -->
31 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.5//EN"
32   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
33 <!ENTITY MAX_MEMBERS_PER_GROUP SYSTEM "login.defs.d/MAX_MEMBERS_PER_GROUP.xml">
34 ]>
35 <refentry id='grpck.8'>
36   <!-- $Id: grpck.8.xml 3023 2009-06-20 13:02:33Z nekral-guest $ -->
37   <refmeta>
38     <refentrytitle>grpck</refentrytitle>
39     <manvolnum>8</manvolnum>
40     <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
41   </refmeta>
42   <refnamediv id='name'>
43     <refname>grpck</refname>
44     <refpurpose>verify integrity of group files</refpurpose>
45   </refnamediv>
46
47   <refsynopsisdiv id='synopsis'>
48     <cmdsynopsis>
49       <command>grpck</command>    <arg choice='opt'>-r </arg>
50       <arg choice='opt'>
51         <arg choice='plain'><replaceable>group</replaceable></arg>
52         <arg choice='opt' condition="gshadow">
53           <arg choice='plain'><replaceable>shadow</replaceable></arg>
54         </arg>
55       </arg>
56     </cmdsynopsis>
57     <cmdsynopsis>
58       <command>grpck</command>    <arg choice='opt'>-s </arg>
59       <arg choice='opt'>
60         <arg choice='plain'><replaceable>group</replaceable></arg>
61         <arg choice='opt' condition="gshadow">
62           <arg choice='plain'><replaceable>shadow</replaceable></arg>
63         </arg>
64       </arg>
65     </cmdsynopsis>
66   </refsynopsisdiv>
67
68   <refsect1 id='description'>
69     <title>DESCRIPTION</title>
70     <para>
71       The <command>grpck</command> command verifies the integrity of the
72       groups information. It checks that all entries in
73       <filename>/etc/group</filename> <phrase condition="gshadow">and
74       <filename>/etc/gshadow</filename></phrase>
75       have the proper format and contain valid data.
76       The user is prompted to delete entries that are
77       improperly formatted or which have other uncorrectable errors.
78     </para>
79
80     <para>Checks are made to verify that each entry has:</para>
81
82     <itemizedlist mark='bullet'>
83       <listitem>
84         <para>the correct number of fields</para>
85       </listitem>
86       <listitem>
87         <para>a unique and valid group name</para>
88       </listitem>
89       <listitem>
90         <para>
91           a valid group identifier
92           <phrase condition="gshadow"> (<filename>/etc/group</filename>
93           only)</phrase>
94         </para>
95       </listitem>
96       <listitem>
97         <para>
98           a valid list of members
99           <phrase condition="gshadow"> and administrators</phrase>
100         </para>
101       </listitem>
102       <listitem condition="gshadow">
103         <para>
104           a corresponding entry in the <filename>/etc/gshadow</filename>
105           file (respectively <filename>/etc/group</filename> for the
106           <filename>gshadow</filename> checks)
107         </para>
108       </listitem>
109     </itemizedlist>
110
111     <para>
112       The checks for correct number of fields and unique group name are
113       fatal. If an entry has the wrong number of fields, the user will be
114       prompted to delete the entire line. If the user does not answer
115       affirmatively, all further checks are bypassed. An entry with a
116       duplicated group name is prompted for deletion, but the remaining
117       checks will still be made. All other errors are warnings and the user
118       is encouraged to run the <command>groupmod</command> command to
119       correct the error.
120     </para>
121
122     <para>
123       The commands which operate on the <filename>/etc/group</filename>
124       <phrase condition="no_gshadow">file</phrase><phrase
125       condition="gshadow">and <filename>/etc/gshadow</filename> files</phrase>
126       are not able to alter corrupted or duplicated entries. 
127       <command>grpck</command> should be used in those circumstances to
128       remove the offending entries.
129     </para>
130   </refsect1>
131
132   <refsect1 id='options'>
133     <title>OPTIONS</title>
134     <para>
135       The options which apply to the <command>grpck</command> command are:
136     </para>
137     <variablelist remap='IP'>
138       <varlistentry>
139         <term><option>-r</option></term>
140         <listitem>
141           <para>
142             Execute the <command>grpck</command> command in read-only mode.
143             This causes all questions regarding changes to be answered
144             <emphasis>no</emphasis> without user intervention.
145           </para>
146         </listitem>
147       </varlistentry>
148       <varlistentry>
149         <term><option>-s</option></term>
150         <listitem>
151           <para>
152             Sort entries in <filename>/etc/group</filename>
153             <phrase condition="gshadow">and
154             <filename>/etc/gshadow</filename></phrase>
155             by GID.
156           </para>
157         </listitem>
158       </varlistentry>
159     </variablelist>
160     <para>
161       By default, <command>grpck</command> operates on
162       <filename>/etc/group</filename><phrase condition="gshadow"> and
163       <filename>/etc/gshadow</filename></phrase>.
164       The user may select alternate files with the <emphasis
165       remap='I'>group</emphasis>
166       <phrase condition="no_gshadow">parameter.</phrase>
167       <phrase condition="gshadow">and <emphasis remap='I'>shadow</emphasis>
168       parameters.</phrase>
169     </para>
170   </refsect1>
171
172   <refsect1 id='configuration'>
173     <title>CONFIGURATION</title>
174     <para>
175       The following configuration variables in
176       <filename>/etc/login.defs</filename> change the behavior of this
177       tool:
178     </para>
179     <variablelist>
180       &MAX_MEMBERS_PER_GROUP;
181     </variablelist>
182   </refsect1>
183
184   <refsect1 id='files'>
185     <title>FILES</title>
186     <variablelist>
187       <varlistentry>
188         <term><filename>/etc/group</filename></term>
189         <listitem>
190           <para>Group account information.</para>
191         </listitem>
192       </varlistentry>
193       <varlistentry condition="gshadow">
194         <term><filename>/etc/gshadow</filename></term>
195         <listitem>
196           <para>Secure group account information.</para>
197         </listitem>
198       </varlistentry>
199       <varlistentry>
200         <term><filename>/etc/passwd</filename></term>
201         <listitem>
202           <para>User account information.</para>
203         </listitem>
204       </varlistentry>
205     </variablelist>
206   </refsect1>
207
208   <refsect1 id='exit_values'>
209     <title>EXIT VALUES</title>
210     <para>
211       The <command>grpck</command> command exits with the following values:
212       <variablelist>
213         <varlistentry>
214           <term><replaceable>0</replaceable></term>
215           <listitem>
216             <para>success</para>
217           </listitem>
218         </varlistentry>
219         <varlistentry>
220           <term><replaceable>1</replaceable></term>
221           <listitem>
222             <para>invalid command syntax</para>
223           </listitem>
224         </varlistentry>
225         <varlistentry>
226           <term><replaceable>2</replaceable></term>
227           <listitem>
228             <para>one or more bad group entries</para>
229           </listitem>
230         </varlistentry>
231         <varlistentry>
232           <term><replaceable>3</replaceable></term>
233           <listitem>
234             <para>can't open group files</para>
235           </listitem>
236         </varlistentry>
237         <varlistentry>
238           <term><replaceable>4</replaceable></term>
239           <listitem>
240             <para>can't lock group files</para>
241           </listitem>
242         </varlistentry>
243         <varlistentry>
244           <term><replaceable>5</replaceable></term>
245           <listitem>
246             <para>can't update group files</para>
247           </listitem>
248         </varlistentry>
249       </variablelist>
250     </para>
251   </refsect1>
252
253   <refsect1 id='see_also'>
254     <title>SEE ALSO</title>
255     <para>
256       <citerefentry>
257         <refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
258       </citerefentry>,
259       <citerefentry>
260         <refentrytitle>groupmod</refentrytitle><manvolnum>8</manvolnum>
261       </citerefentry>,
262       <phrase condition="gshadow">
263         <citerefentry>
264           <refentrytitle>gshadow</refentrytitle><manvolnum>5</manvolnum>,
265         </citerefentry>,
266       </phrase>
267       <citerefentry>
268         <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
269       </citerefentry>,
270       <citerefentry>
271         <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
272       </citerefentry>,
273       <citerefentry>
274         <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
275       </citerefentry>.
276     </para>
277   </refsect1>
278 </refentry>