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