1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 1991 , Julianne Frances Haugh
4 Copyright (c) 2007 - 2011, Nicolas François
7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions
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.
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.
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 -->
36 <refentry id='groupmod.8'>
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>
45 <refnamediv id='name'>
46 <refname>groupmod</refname>
47 <refpurpose>modify a group definition on the system</refpurpose>
49 <!-- body begins here -->
50 <refsynopsisdiv id='synopsis'>
52 <command>groupmod</command>
54 <replaceable>options</replaceable>
56 <arg choice='plain'><replaceable>GROUP</replaceable></arg>
60 <refsect1 id='description'>
61 <title>DESCRIPTION</title>
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.
69 <refsect1 id='options'>
70 <title>OPTIONS</title>
72 The options which apply to the <command>groupmod</command> command
75 <variablelist remap='IP'>
78 <option>-g</option>, <option>--gid</option> <replaceable>GID</replaceable>
82 The group ID of the given <replaceable>GROUP</replaceable> will
83 be changed to <replaceable>GID</replaceable>.
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.
92 Users who use the group as primary group will be updated to
93 keep the group as their primary group.
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
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>.
110 <term><option>-h</option>, <option>--help</option></term>
112 <para>Display help message and exit.</para>
117 <option>-n</option>, <option>--new-name</option>
118 <replaceable>NEW_GROUP</replaceable>
122 The name of the group will be changed from <replaceable>GROUP</replaceable>
123 to <replaceable>NEW_GROUP</replaceable> name.
129 <option>-o</option>, <option>--non-unique</option>
133 When used with the <option>-g</option> option, allow to change the
134 group <replaceable>GID</replaceable> to a non-unique value.
140 <option>-p</option>, <option>--password</option>
141 <replaceable>PASSWORD</replaceable>
145 The encrypted password, as returned by <citerefentry>
146 <refentrytitle>crypt</refentrytitle><manvolnum>3</manvolnum>
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.
155 You should make sure the password respects the system's
162 <option>-R</option>, <option>--root</option>
163 <replaceable>CHROOT_DIR</replaceable>
167 Apply changes in the <replaceable>CHROOT_DIR</replaceable>
168 directory and use the configuration files from the
169 <replaceable>CHROOT_DIR</replaceable> directory.
176 <refsect1 id='configuration'>
177 <title>CONFIGURATION</title>
179 The following configuration variables in
180 <filename>/etc/login.defs</filename> change the behavior of this
184 &MAX_MEMBERS_PER_GROUP;
188 <refsect1 id='files'>
192 <term><filename>/etc/group</filename></term>
194 <para>Group account information.</para>
197 <varlistentry condition="gshadow">
198 <term><filename>/etc/gshadow</filename></term>
200 <para>Secure group account information.</para>
204 <term><filename>/etc/login.defs</filename></term>
206 <para>Shadow password suite configuration.</para>
210 <term><filename>/etc/passwd</filename></term>
212 <para>User account information.</para>
218 <refsect1 id='exit_values'>
219 <title>EXIT VALUES</title>
221 The <command>groupmod</command> command exits with the following values:
224 <term><replaceable>0</replaceable></term>
230 <term><replaceable>2</replaceable></term>
232 <para>invalid command syntax</para>
236 <term><replaceable>3</replaceable></term>
238 <para>invalid argument to option</para>
242 <term><replaceable>4</replaceable></term>
244 <para>specified group doesn't exist</para>
248 <term><replaceable>6</replaceable></term>
250 <para>specified group doesn't exist</para>
254 <term><replaceable>9</replaceable></term>
256 <para>group name already in use</para>
260 <term><replaceable>10</replaceable></term>
262 <para>can't update group file</para>
269 <refsect1 id='see_also'>
270 <title>SEE ALSO</title>
273 <refentrytitle>chfn</refentrytitle><manvolnum>1</manvolnum>
276 <refentrytitle>chsh</refentrytitle><manvolnum>1</manvolnum>
279 <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
282 <refentrytitle>gpasswd</refentrytitle><manvolnum>8</manvolnum>
285 <refentrytitle>groupadd</refentrytitle><manvolnum>8</manvolnum>
288 <refentrytitle>groupdel</refentrytitle><manvolnum>8</manvolnum>
291 <refentrytitle>login.defs</refentrytitle><manvolnum>5</manvolnum>
294 <refentrytitle>useradd</refentrytitle><manvolnum>8</manvolnum>
297 <refentrytitle>userdel</refentrytitle><manvolnum>8</manvolnum>
300 <refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>