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'>
40 <!-- $Id: gpasswd.1.xml 3008 2009-05-26 19:23:40Z nekral-guest $ -->
42 <refentrytitle>gpasswd</refentrytitle>
43 <manvolnum>1</manvolnum>
44 <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
46 <refnamediv id='name'>
47 <refname>gpasswd</refname>
49 <phrase condition="no_gshadow">
50 administer <filename>/etc/group</filename>
52 <phrase condition="gshadow">
53 administer <filename>/etc/group</filename> and
54 <filename>/etc/gshadow</filename>
58 <!-- body begins here -->
59 <refsynopsisdiv id='synopsis'>
61 <command>gpasswd</command>
63 <replaceable>option</replaceable>
66 <replaceable>group</replaceable>
71 <refsect1 id='description'>
72 <title>DESCRIPTION</title>
74 The <command>gpasswd</command> command is used to administer
75 <filename>/etc/group</filename><phrase condition="gshadow">,
76 and <filename>/etc/gshadow</filename></phrase>.
78 <phrase condition="gshadow">administrators,</phrase>
79 members and a password.
81 <para condition="gshadow">
82 System administrators can use the <option>-A</option> option to define
83 group administrator(s) and the <option>-M</option> option to define
84 members. They have all rights of group administrators and members.
87 <command>gpasswd</command> called by
88 <phrase condition="gshadow">a group administrator</phrase>
89 <phrase condition="no_gshadow">a system administrator</phrase>
90 with a group name only prompts for the new password of the
91 <replaceable>group</replaceable>.
94 If a password is set the members can still use <citerefentry>
95 <refentrytitle>newgrp</refentrytitle><manvolnum>1</manvolnum>
96 </citerefentry> without a password, and non-members must supply the
100 <refsect2 id='notes_about_group_passwords'>
101 <title>Notes about group passwords</title>
103 Group passwords are an inherent security problem since more than one
104 person is permitted to know the password. However, groups are a
105 useful tool for permitting co-operation between different users.
111 <refsect1 id='options'>
112 <title>OPTIONS</title>
113 <para condition="gshadow">
114 Except for the <option>-A</option> and <option>-M</option> options,
115 the options cannot be combined.
117 <para condition="no_gshadow">
118 The options cannot be combined.
121 The options which apply to the <command>gpasswd</command> command are:
123 <variablelist remap='IP'>
126 <option>-a</option>, <option>--add</option> <replaceable>user</replaceable>
130 Add the <replaceable>user</replaceable> to the named
131 <replaceable>group</replaceable>.
136 <variablelist remap='IP'>
139 <option>-d</option>, <option>--delete</option> <replaceable>user</replaceable>
143 Remove the <replaceable>user</replaceable> from the named
144 <replaceable>group</replaceable>.
149 <variablelist remap='IP'>
152 <option>-r</option>, <option>--remove-password</option>
156 Remove the password from the named <replaceable>group</replaceable>.
157 Only group members will be allowed to use
158 <command>newgrp</command> to join the named
159 <replaceable>group</replaceable>.
164 <variablelist remap='IP'>
167 <option>-R</option>, <option>--restrict</option>
171 Restrict the access to the named <replaceable>group</replaceable>.
172 Only group members will be allowed to use
173 <command>newgrp</command> to join the named
174 <replaceable>group</replaceable>.
179 <variablelist remap='IP' condition="gshadow">
182 <option>-A</option>, <option>--administrators</option> <replaceable>user</replaceable>,...
186 Set the list of administrative users.
191 <variablelist remap='IP'>
194 <option>-M</option>, <option>--members</option> <replaceable>user</replaceable>,...
198 Set the list of group members.
205 <refsect1 id='caveats'>
206 <title>CAVEATS</title>
208 This tool only operates on the <filename>/etc/group</filename>
209 <phrase condition="gshadow"> and <filename>/etc/gshadow</filename>
211 <phrase condition="no_gshadow">file.</phrase>
212 Thus you cannot change any NIS or LDAP group. This must be performed
213 on the corresponding server.
217 <refsect1 id='configuration'>
218 <title>CONFIGURATION</title>
220 The following configuration variables in
221 <filename>/etc/login.defs</filename> change the behavior of this
226 &MAX_MEMBERS_PER_GROUP;
228 &SHA_CRYPT_MIN_ROUNDS; <!--This also document SHA_CRYPT_MAX_ROUNDS-->
232 <refsect1 id='files'>
236 <term><filename>/etc/group</filename></term>
238 <para>Group account information.</para>
241 <varlistentry condition="gshadow">
242 <term><filename>/etc/gshadow</filename></term>
244 <para>Secure group account information.</para>
250 <refsect1 id='see_also'>
251 <title>SEE ALSO</title>
254 <refentrytitle>newgrp</refentrytitle><manvolnum>1</manvolnum>
257 <refentrytitle>groupadd</refentrytitle><manvolnum>8</manvolnum>
260 <refentrytitle>groupdel</refentrytitle><manvolnum>8</manvolnum>
263 <refentrytitle>groupmod</refentrytitle><manvolnum>8</manvolnum>
266 <refentrytitle>grpck</refentrytitle><manvolnum>8</manvolnum>
269 <refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
270 </citerefentry><phrase condition="gshadow">,
272 <refentrytitle>gshadow</refentrytitle><manvolnum>5</manvolnum>
273 </citerefentry></phrase>.