Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / groupmod.8.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 1991       , 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='groupmod.8'>
36   <!-- $Id: groupmod.8.xml 2952 2009-05-19 22:00:14Z nekral-guest $ -->
37   <refmeta>
38     <refentrytitle>groupmod</refentrytitle>
39     <manvolnum>8</manvolnum>
40     <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
41   </refmeta>
42   <refnamediv id='name'>
43     <refname>groupmod</refname>
44     <refpurpose>modify a group definition on the system</refpurpose>
45   </refnamediv>
46   <!-- body begins here -->
47   <refsynopsisdiv id='synopsis'>
48     <cmdsynopsis>
49       <command>groupmod</command>
50       <arg choice='opt'>
51         <replaceable>options</replaceable>
52       </arg>
53       <arg choice='plain'><replaceable>GROUP</replaceable></arg>
54     </cmdsynopsis>
55   </refsynopsisdiv>
56
57   <refsect1 id='description'>
58     <title>DESCRIPTION</title>
59     <para>
60       The <command>groupmod</command> command modifies the definition of the
61       specified <replaceable>GROUP</replaceable> by modifying the appropriate
62       entry in the group database.
63     </para>
64   </refsect1>
65
66   <refsect1 id='options'>
67     <title>OPTIONS</title>
68     <para>
69       The options which apply to the <command>groupmod</command> command
70       are:
71     </para>
72     <variablelist remap='IP'>
73       <varlistentry>
74         <term>
75           <option>-g</option>, <option>--gid</option> <replaceable>GID</replaceable>
76         </term>
77         <listitem>
78           <para>
79             The group ID of the given <replaceable>GROUP</replaceable> will
80             be changed to <replaceable>GID</replaceable>.
81           </para>
82           <para>
83             The value of
84             <replaceable>GID</replaceable> must be a non-negative decimal
85             integer. This value must be unique, unless the
86             <option>-o</option> option is used. Values between 0 and 999 are
87             typically reserved for system groups.
88           </para>
89           <para>
90             Any files that have the
91             old group ID and must continue to belong to
92             <replaceable>GROUP</replaceable>, must have their group ID
93             changed manually.
94           </para>
95         </listitem>
96       </varlistentry>
97       <varlistentry>
98         <term><option>-h</option>, <option>--help</option></term>
99         <listitem>
100           <para>Display help message and exit.</para>
101         </listitem>
102       </varlistentry>
103       <varlistentry>
104         <term>
105           <option>-n</option>, <option>--new-name</option>
106           <replaceable>NEW_GROUP</replaceable>
107         </term>
108         <listitem>
109           <para> 
110             The name of the group will be changed from <replaceable>GROUP</replaceable>
111             to <replaceable>NEW_GROUP</replaceable> name.
112           </para>
113         </listitem>
114       </varlistentry>
115       <varlistentry>
116         <term>
117           <option>-o</option>, <option>--non-unique</option>
118         </term>
119         <listitem>
120           <para>
121             When used with the <option>-g</option> option, allow to change the
122             group <replaceable>GID</replaceable> to a non-unique value.
123           </para>
124         </listitem>
125       </varlistentry>
126       <varlistentry>
127         <term>
128           <option>-p</option>, <option>--password</option>
129           <replaceable>PASSWORD</replaceable>
130         </term>
131         <listitem>
132           <para>
133             The encrypted password, as returned by <citerefentry>
134             <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
135             </citerefentry>.
136           </para>
137           <para>
138             <emphasis role="bold">Note:</emphasis> This option is not
139             recommended because the password (or encrypted password) will
140             be visible by users listing the processes.
141           </para>
142           <para>
143             You should make sure the password respects the system's
144             password policy.
145           </para>
146         </listitem>
147       </varlistentry>
148     </variablelist>
149   </refsect1>
150
151   <refsect1 id='configuration'>
152     <title>CONFIGURATION</title>
153     <para>
154       The following configuration variables in
155       <filename>/etc/login.defs</filename> change the behavior of this
156       tool:
157     </para>
158     <variablelist>
159       &MAX_MEMBERS_PER_GROUP;
160     </variablelist>
161   </refsect1>
162
163   <refsect1 id='files'>
164     <title>FILES</title>
165     <variablelist>
166       <varlistentry>
167         <term><filename>/etc/group</filename></term>
168         <listitem>
169           <para>Group account information.</para>
170         </listitem>
171       </varlistentry>
172       <varlistentry condition="gshadow">
173         <term><filename>/etc/gshadow</filename></term>
174         <listitem>
175           <para>Secure group account information.</para>
176         </listitem>
177       </varlistentry>
178     </variablelist>
179   </refsect1>
180
181   <refsect1 id='exit_values'>
182     <title>EXIT VALUES</title>
183     <para>
184       The <command>groupmod</command> command exits with the following values:
185       <variablelist>
186         <varlistentry>
187           <term><replaceable>0</replaceable></term>
188           <listitem>
189             <para>success</para>
190           </listitem>
191         </varlistentry>
192         <varlistentry>
193           <term><replaceable>2</replaceable></term>
194           <listitem>
195             <para>invalid command syntax</para>
196           </listitem>
197         </varlistentry>
198         <varlistentry>
199           <term><replaceable>3</replaceable></term>
200           <listitem>
201             <para>invalid argument to option</para>
202           </listitem>
203         </varlistentry>
204         <varlistentry>
205           <term><replaceable>4</replaceable></term>
206           <listitem>
207             <para>specified group doesn't exist</para>
208           </listitem>
209         </varlistentry>
210         <varlistentry>
211           <term><replaceable>6</replaceable></term>
212           <listitem>
213             <para>specified group doesn't exist</para>
214           </listitem>
215         </varlistentry>
216         <varlistentry>
217           <term><replaceable>9</replaceable></term>
218           <listitem>
219             <para>group name already in use</para>
220           </listitem>
221         </varlistentry>
222         <varlistentry>
223           <term><replaceable>10</replaceable></term>
224           <listitem>
225             <para>can't update group file</para>
226           </listitem>
227         </varlistentry>
228       </variablelist>
229     </para>
230   </refsect1>
231
232   <refsect1 id='see_also'>
233     <title>SEE ALSO</title>
234     <para>
235       <citerefentry>
236         <refentrytitle>chfn</refentrytitle><manvolnum>1</manvolnum>
237       </citerefentry>,
238       <citerefentry>
239         <refentrytitle>chsh</refentrytitle><manvolnum>1</manvolnum>
240       </citerefentry>,
241       <citerefentry>
242         <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
243       </citerefentry>,
244       <citerefentry>
245         <refentrytitle>gpasswd</refentrytitle><manvolnum>8</manvolnum>
246       </citerefentry>,
247       <citerefentry>
248         <refentrytitle>groupadd</refentrytitle><manvolnum>8</manvolnum>
249       </citerefentry>,
250       <citerefentry>
251         <refentrytitle>groupdel</refentrytitle><manvolnum>8</manvolnum>
252       </citerefentry>,
253       <citerefentry>
254         <refentrytitle>useradd</refentrytitle><manvolnum>8</manvolnum>
255       </citerefentry>,
256       <citerefentry>
257         <refentrytitle>userdel</refentrytitle><manvolnum>8</manvolnum>
258       </citerefentry>,
259       <citerefentry>
260         <refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>
261       </citerefentry>.
262     </para>
263   </refsect1>
264 </refentry>