]> granicus.if.org Git - shadow/blob - man/grpck.8.xml
remove unused fn commonio_next
[shadow] / 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 - 2011, 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 <!-- SHADOW-CONFIG-HERE -->
35 ]>
36 <refentry id='grpck.8'>
37   <!-- $Id$ -->
38   <refentryinfo>
39     <author>
40       <firstname>Julianne Frances</firstname>
41       <surname>Haugh</surname>
42       <contrib>Creation, 1992</contrib>
43     </author>
44     <author>
45       <firstname>Thomas</firstname>
46       <surname>Kłoczko</surname>
47       <email>kloczek@pld.org.pl</email>
48       <contrib>shadow-utils maintainer, 2000 - 2007</contrib>
49     </author>
50     <author>
51       <firstname>Nicolas</firstname>
52       <surname>François</surname>
53       <email>nicolas.francois@centraliens.net</email>
54       <contrib>shadow-utils maintainer, 2007 - now</contrib>
55     </author>
56   </refentryinfo>
57   <refmeta>
58     <refentrytitle>grpck</refentrytitle>
59     <manvolnum>8</manvolnum>
60     <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
61     <refmiscinfo class="source">shadow-utils</refmiscinfo>
62     <refmiscinfo class="version">&SHADOW_UTILS_VERSION;</refmiscinfo>
63   </refmeta>
64   <refnamediv id='name'>
65     <refname>grpck</refname>
66     <refpurpose>verify integrity of group files</refpurpose>
67   </refnamediv>
68
69   <refsynopsisdiv id='synopsis'>
70     <cmdsynopsis>
71       <command>grpck</command>
72       <arg choice='opt'>options</arg>
73       <arg choice='opt'>
74         <arg choice='plain'><replaceable>group</replaceable></arg>
75         <arg choice='opt' condition="gshadow">
76           <arg choice='plain'><replaceable>shadow</replaceable></arg>
77         </arg>
78       </arg>
79     </cmdsynopsis>
80   </refsynopsisdiv>
81
82   <refsect1 id='description'>
83     <title>DESCRIPTION</title>
84     <para>
85       The <command>grpck</command> command verifies the integrity of the
86       groups information. It checks that all entries in
87       <filename>/etc/group</filename> <phrase condition="gshadow">and
88       <filename>/etc/gshadow</filename></phrase>
89       have the proper format and contain valid data.
90       The user is prompted to delete entries that are
91       improperly formatted or which have other uncorrectable errors.
92     </para>
93
94     <para>Checks are made to verify that each entry has:</para>
95
96     <itemizedlist mark='bullet'>
97       <listitem>
98         <para>the correct number of fields</para>
99       </listitem>
100       <listitem>
101         <para>a unique and valid group name</para>
102       </listitem>
103       <listitem>
104         <para>
105           a valid group identifier
106           <phrase condition="gshadow"> (<filename>/etc/group</filename>
107           only)</phrase>
108         </para>
109       </listitem>
110       <listitem>
111         <para>
112           a valid list of members
113           <phrase condition="gshadow"> and administrators</phrase>
114         </para>
115       </listitem>
116       <listitem condition="gshadow">
117         <para>
118           a corresponding entry in the <filename>/etc/gshadow</filename>
119           file (respectively <filename>/etc/group</filename> for the
120           <filename>gshadow</filename> checks)
121         </para>
122       </listitem>
123     </itemizedlist>
124
125     <para>
126       The checks for correct number of fields and unique group name are
127       fatal. If an entry has the wrong number of fields, the user will be
128       prompted to delete the entire line. If the user does not answer
129       affirmatively, all further checks are bypassed. An entry with a
130       duplicated group name is prompted for deletion, but the remaining
131       checks will still be made. All other errors are warnings and the user
132       is encouraged to run the <command>groupmod</command> command to
133       correct the error.
134     </para>
135
136     <para>
137       The commands which operate on the <filename>/etc/group</filename>
138       <phrase condition="no_gshadow">file</phrase><phrase
139       condition="gshadow">and <filename>/etc/gshadow</filename> files</phrase>
140       are not able to alter corrupted or duplicated entries. 
141       <command>grpck</command> should be used in those circumstances to
142       remove the offending entries.
143     </para>
144   </refsect1>
145
146   <refsect1 id='options'>
147     <title>OPTIONS</title>
148     <para>
149       The <option>-r</option> and <option>-s</option> options cannot be
150       combined.
151     </para>
152     <para>
153       The options which apply to the <command>grpck</command> command are:
154     </para>
155     <variablelist remap='IP'>
156       <varlistentry>
157         <term><option>-h</option>, <option>--help</option></term>
158         <listitem>
159           <para>Display help message and exit.</para>
160         </listitem>
161       </varlistentry>
162       <varlistentry>
163         <term><option>-r</option>, <option>--read-only</option></term>
164         <listitem>
165           <para>
166             Execute the <command>grpck</command> command in read-only mode.
167             This causes all questions regarding changes to be answered
168             <emphasis>no</emphasis> without user intervention.
169           </para>
170         </listitem>
171       </varlistentry>
172       <varlistentry>
173         <term>
174           <option>-R</option>, <option>--root</option>&nbsp;<replaceable>CHROOT_DIR</replaceable>
175         </term>
176         <listitem>
177           <para>
178             Apply changes in the <replaceable>CHROOT_DIR</replaceable>
179             directory and use the configuration files from the
180             <replaceable>CHROOT_DIR</replaceable> directory.
181           </para>
182         </listitem>
183       </varlistentry>
184       <varlistentry>
185         <term><option>-s</option>, <option>--sort</option></term>
186         <listitem>
187           <para>
188             Sort entries in <filename>/etc/group</filename>
189             <phrase condition="gshadow">and
190             <filename>/etc/gshadow</filename></phrase>
191             by GID.
192           </para>
193         </listitem>
194       </varlistentry>
195     </variablelist>
196     <para>
197       By default, <command>grpck</command> operates on
198       <filename>/etc/group</filename> <phrase condition="gshadow">and
199       <filename>/etc/gshadow</filename></phrase>.
200       The user may select alternate files with the <emphasis
201       remap='I'>group</emphasis>
202       <phrase condition="no_gshadow">parameter.</phrase>
203       <phrase condition="gshadow">and <emphasis remap='I'>shadow</emphasis>
204       parameters.</phrase>
205     </para>
206   </refsect1>
207
208   <refsect1 id='configuration'>
209     <title>CONFIGURATION</title>
210     <para>
211       The following configuration variables in
212       <filename>/etc/login.defs</filename> change the behavior of this
213       tool:
214     </para>
215     <variablelist>
216       &MAX_MEMBERS_PER_GROUP;
217     </variablelist>
218   </refsect1>
219
220   <refsect1 id='files'>
221     <title>FILES</title>
222     <variablelist>
223       <varlistentry>
224         <term><filename>/etc/group</filename></term>
225         <listitem>
226           <para>Group account information.</para>
227         </listitem>
228       </varlistentry>
229       <varlistentry condition="gshadow">
230         <term><filename>/etc/gshadow</filename></term>
231         <listitem>
232           <para>Secure group account information.</para>
233         </listitem>
234       </varlistentry>
235       <varlistentry>
236         <term><filename>/etc/passwd</filename></term>
237         <listitem>
238           <para>User account information.</para>
239         </listitem>
240       </varlistentry>
241     </variablelist>
242   </refsect1>
243
244   <refsect1 id='exit_values'>
245     <title>EXIT VALUES</title>
246     <para>
247       The <command>grpck</command> command exits with the following values:
248       <variablelist>
249         <varlistentry>
250           <term><replaceable>0</replaceable></term>
251           <listitem>
252             <para>success</para>
253           </listitem>
254         </varlistentry>
255         <varlistentry>
256           <term><replaceable>1</replaceable></term>
257           <listitem>
258             <para>invalid command syntax</para>
259           </listitem>
260         </varlistentry>
261         <varlistentry>
262           <term><replaceable>2</replaceable></term>
263           <listitem>
264             <para>one or more bad group entries</para>
265           </listitem>
266         </varlistentry>
267         <varlistentry>
268           <term><replaceable>3</replaceable></term>
269           <listitem>
270             <para>can't open group files</para>
271           </listitem>
272         </varlistentry>
273         <varlistentry>
274           <term><replaceable>4</replaceable></term>
275           <listitem>
276             <para>can't lock group files</para>
277           </listitem>
278         </varlistentry>
279         <varlistentry>
280           <term><replaceable>5</replaceable></term>
281           <listitem>
282             <para>can't update group files</para>
283           </listitem>
284         </varlistentry>
285       </variablelist>
286     </para>
287   </refsect1>
288
289   <refsect1 id='see_also'>
290     <title>SEE ALSO</title>
291     <para>
292       <citerefentry>
293         <refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
294       </citerefentry>,
295       <citerefentry>
296         <refentrytitle>groupmod</refentrytitle><manvolnum>8</manvolnum>
297       </citerefentry>,
298       <phrase condition="gshadow">
299         <citerefentry>
300           <refentrytitle>gshadow</refentrytitle><manvolnum>5</manvolnum>,
301         </citerefentry>,
302       </phrase>
303       <citerefentry>
304         <refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
305       </citerefentry>,
306       <citerefentry>
307         <refentrytitle>pwck</refentrytitle><manvolnum>8</manvolnum>
308       </citerefentry>,
309       <citerefentry>
310         <refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
311       </citerefentry>.
312     </para>
313   </refsect1>
314 </refentry>