1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 1996 , Rafal Maszkowski
4 Copyright (c) 2007 - 2008, 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 ENCRYPT_METHOD SYSTEM "login.defs.d/ENCRYPT_METHOD.xml">
34 <!ENTITY MAX_MEMBERS_PER_GROUP SYSTEM "login.defs.d/MAX_MEMBERS_PER_GROUP.xml">
35 <!ENTITY MD5_CRYPT_ENAB SYSTEM "login.defs.d/MD5_CRYPT_ENAB.xml">
36 <!ENTITY SHA_CRYPT_MIN_ROUNDS SYSTEM "login.defs.d/SHA_CRYPT_MIN_ROUNDS.xml">
39 <refentry id='gpasswd.1'>
42 <refentrytitle>gpasswd</refentrytitle>
43 <manvolnum>1</manvolnum>
44 <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
46 <refnamediv id='name'>
47 <refname>gpasswd</refname>
49 administer the <filename>/etc/group</filename>
50 <phrase condition="gshadow">and <filename>/etc/gshadow</filename>
52 <phrase condition="no_gshadow">file</phrase>
55 <!-- body begins here -->
56 <refsynopsisdiv id='synopsis'>
58 <command>gpasswd</command>
60 <replaceable>option</replaceable>
63 <replaceable>group</replaceable>
68 <refsect1 id='description'>
69 <title>DESCRIPTION</title>
71 The <command>gpasswd</command> command is used to administer
72 <filename>/etc/group</filename><phrase condition="gshadow">,
73 and <filename>/etc/gshadow</filename></phrase>.
75 <phrase condition="gshadow">administrators,</phrase>
76 members and a password.
78 <para condition="gshadow">
79 System administrators can use the <option>-A</option> option to define
80 group administrator(s) and the <option>-M</option> option to define
81 members and has all rights of group administrators and members.
84 <command>gpasswd</command> called by
85 <phrase condition="gshadow">a group administrator</phrase>
86 <phrase condition="no_gshadow">a system administrator</phrase>
87 with a group name only prompts for the new password of the
88 <replaceable>group</replaceable>.
91 If a password is set the members can still use <citerefentry>
92 <refentrytitle>newgrp</refentrytitle><manvolnum>1</manvolnum>
93 </citerefentry> without a password, and non-members must supply the
97 <refsect2 id='notes_about_group_passwords'>
98 <title>Notes about group passwords</title>
100 Group passwords are an inherent security problem since more than one
101 person is permitted to know the password. However, groups are a
102 useful tool for permitting co-operation between different users.
108 <refsect1 id='options'>
109 <title>OPTIONS</title>
110 <para condition="gshadow">
111 Except for the <option>-A</option> and <option>-M</option> options,
112 the options cannot be combined.
114 <para condition="no_gshadow">
115 The options cannot be combined.
118 The options which apply to the <command>gpasswd</command> command are:
120 <variablelist remap='IP'>
123 <option>-a</option>, <option>--add</option> <replaceable>user</replaceable>
127 Add the <replaceable>user</replaceable> to the named
128 <replaceable>group</replaceable>.
133 <variablelist remap='IP'>
136 <option>-d</option>, <option>--delete</option> <replaceable>user</replaceable>
140 Remove the <replaceable>user</replaceable> from the named
141 <replaceable>group</replaceable>.
146 <variablelist remap='IP'>
149 <option>-r</option>, <option>--remove-password</option>
153 Remove the password from the named <replaceable>group</replaceable>.
154 Only group members will be allowed to use
155 <command>newgrp</command> to join the named
156 <replaceable>group</replaceable>.
161 <variablelist remap='IP'>
164 <option>-R</option>, <option>--restrict</option>
168 Restrict the access to the named <replaceable>group</replaceable>.
169 Only group members will be allowed to use
170 <command>newgrp</command> to join the named
171 <replaceable>group</replaceable>.
176 <variablelist remap='IP' condition="gshadow">
179 <option>-A</option>, <option>--administrators</option> <replaceable>user</replaceable>,...
183 Set the list of administrative users.
188 <variablelist remap='IP'>
191 <option>-M</option>, <option>--members</option> <replaceable>user</replaceable>,...
195 Set the list of group members.
202 <refsect1 id='caveats'>
203 <title>CAVEATS</title>
205 This tool only operates on the <filename>/etc/group</filename>
206 <phrase condition="gshadow"> and <filename>/etc/gshadow</filename>
208 <phrase condition="no_gshadow">file.</phrase>
209 Thus you cannot change any NIS or LDAP group. This must be performed
210 on the corresponding server.
214 <refsect1 id='configuration'>
215 <title>CONFIGURATION</title>
217 The following configuration variables in
218 <filename>/etc/login.defs</filename> change the behavior of this
223 &MAX_MEMBERS_PER_GROUP;
225 &SHA_CRYPT_MIN_ROUNDS; <!--This also document SHA_CRYPT_MAX_ROUNDS-->
229 <refsect1 id='files'>
233 <term><filename>/etc/group</filename></term>
235 <para>Group account information.</para>
238 <varlistentry condition="gshadow">
239 <term><filename>/etc/gshadow</filename></term>
241 <para>Secure group account information.</para>
247 <refsect1 id='see_also'>
248 <title>SEE ALSO</title>
251 <refentrytitle>newgrp</refentrytitle><manvolnum>1</manvolnum>
254 <refentrytitle>groupadd</refentrytitle><manvolnum>8</manvolnum>
257 <refentrytitle>groupdel</refentrytitle><manvolnum>8</manvolnum>
260 <refentrytitle>groupmod</refentrytitle><manvolnum>8</manvolnum>
263 <refentrytitle>grpck</refentrytitle><manvolnum>8</manvolnum>
266 <refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
267 </citerefentry><phrase condition="gshadow">,
269 <refentrytitle>gshadow</refentrytitle><manvolnum>5</manvolnum>
270 </citerefentry></phrase>.