]> granicus.if.org Git - shadow/blob - man/gpasswd.1.xml
* man/chpasswd.8.xml, man/grpck.8.xml, man/newgrp.1.xml,
[shadow] / man / gpasswd.1.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 1996       , Rafal Maszkowski
4    Copyright (c) 2007 - 2008, 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 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">
37 ]>
38
39 <refentry id='gpasswd.1'>
40   <!-- $Id$ -->
41   <refmeta>
42     <refentrytitle>gpasswd</refentrytitle>
43     <manvolnum>1</manvolnum>
44     <refmiscinfo class="sectdesc">User Commands</refmiscinfo>
45   </refmeta>
46   <refnamediv id='name'>
47     <refname>gpasswd</refname>
48     <refpurpose>
49       administer the <filename>/etc/group</filename>
50       <phrase condition="gshadow">and <filename>/etc/gshadow</filename>
51       files</phrase>
52       <phrase condition="no_gshadow">file</phrase>
53     </refpurpose>
54   </refnamediv>
55   <!-- body begins here -->
56   <refsynopsisdiv id='synopsis'>
57     <cmdsynopsis>
58       <command>gpasswd</command>
59       <arg choice='opt'>
60         <replaceable>option</replaceable>
61       </arg>
62       <arg choice='plain'>
63         <replaceable>group</replaceable>
64       </arg>
65     </cmdsynopsis>
66   </refsynopsisdiv>
67
68   <refsect1 id='description'>
69     <title>DESCRIPTION</title>
70     <para>
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>.
74       Every group can have
75       <phrase condition="gshadow">administrators,</phrase>
76       members and a password.
77     </para>
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.
82     </para>
83     <para>
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>.
89     </para>
90     <para>
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
94       password.
95     </para>
96
97     <refsect2 id='notes_about_group_passwords'>
98       <title>Notes about group passwords</title>
99       <para>
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.
103       </para>
104     </refsect2>
105
106   </refsect1>
107
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.
113     </para>
114     <para condition="no_gshadow">
115       The options cannot be combined.
116     </para>
117     <para>
118       The options which apply to the <command>gpasswd</command> command are:
119     </para>
120     <variablelist remap='IP'>
121       <varlistentry>
122         <term>
123           <option>-a</option>, <option>--add</option> <replaceable>user</replaceable>
124         </term>
125         <listitem>
126           <para>
127             Add the <replaceable>user</replaceable> to the named
128             <replaceable>group</replaceable>.
129           </para>
130         </listitem>
131       </varlistentry>
132     </variablelist>
133     <variablelist remap='IP'>
134       <varlistentry>
135         <term>
136           <option>-d</option>, <option>--delete</option> <replaceable>user</replaceable>
137         </term>
138         <listitem>
139           <para>
140             Remove the <replaceable>user</replaceable> from the named
141             <replaceable>group</replaceable>.
142           </para>
143         </listitem>
144       </varlistentry>
145     </variablelist>
146     <variablelist remap='IP'>
147       <varlistentry>
148         <term>
149           <option>-r</option>, <option>--remove-password</option>
150         </term>
151         <listitem>
152           <para>
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>.
157           </para>
158         </listitem>
159       </varlistentry>
160     </variablelist>
161     <variablelist remap='IP'>
162       <varlistentry>
163         <term>
164           <option>-R</option>, <option>--restrict</option>
165         </term>
166         <listitem>
167           <para>
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>.
172           </para>
173         </listitem>
174       </varlistentry>
175     </variablelist>
176     <variablelist remap='IP' condition="gshadow">
177       <varlistentry>
178         <term>
179           <option>-A</option>, <option>--administrators</option> <replaceable>user</replaceable>,...
180         </term>
181         <listitem>
182           <para>
183             Set the list of administrative users.
184           </para>
185         </listitem>
186       </varlistentry>
187     </variablelist>
188     <variablelist remap='IP'>
189       <varlistentry>
190         <term>
191           <option>-M</option>, <option>--members</option> <replaceable>user</replaceable>,...
192         </term>
193         <listitem>
194           <para>
195             Set the list of group members.
196           </para>
197         </listitem>
198       </varlistentry>
199     </variablelist>
200   </refsect1>
201
202   <refsect1 id='caveats'>
203     <title>CAVEATS</title>
204     <para>
205       This tool only operates on the <filename>/etc/group</filename>
206       <phrase condition="gshadow"> and <filename>/etc/gshadow</filename>
207       files.</phrase>
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.
211     </para>
212   </refsect1>
213
214   <refsect1 id='configuration'>
215     <title>CONFIGURATION</title>
216     <para>
217       The following configuration variables in
218       <filename>/etc/login.defs</filename> change the behavior of this
219       tool:
220     </para>
221     <variablelist>
222       &ENCRYPT_METHOD;
223       &MAX_MEMBERS_PER_GROUP;
224       &MD5_CRYPT_ENAB;
225       &SHA_CRYPT_MIN_ROUNDS; <!--This also document SHA_CRYPT_MAX_ROUNDS-->
226     </variablelist>
227   </refsect1>
228
229   <refsect1 id='files'>
230     <title>FILES</title>
231     <variablelist>
232       <varlistentry>
233         <term><filename>/etc/group</filename></term>
234         <listitem>
235           <para>Group account information.</para>
236         </listitem>
237       </varlistentry>
238       <varlistentry condition="gshadow">
239         <term><filename>/etc/gshadow</filename></term>
240         <listitem>
241           <para>Secure group account information.</para>
242         </listitem>
243       </varlistentry>
244     </variablelist>
245   </refsect1>
246
247   <refsect1 id='see_also'>
248     <title>SEE ALSO</title>
249     <para>
250       <citerefentry>
251         <refentrytitle>newgrp</refentrytitle><manvolnum>1</manvolnum>
252       </citerefentry>,
253       <citerefentry>
254         <refentrytitle>groupadd</refentrytitle><manvolnum>8</manvolnum>
255       </citerefentry>,
256       <citerefentry>
257         <refentrytitle>groupdel</refentrytitle><manvolnum>8</manvolnum>
258       </citerefentry>,
259       <citerefentry>
260         <refentrytitle>groupmod</refentrytitle><manvolnum>8</manvolnum>
261       </citerefentry>,
262       <citerefentry>
263         <refentrytitle>grpck</refentrytitle><manvolnum>8</manvolnum>
264       </citerefentry>,
265       <citerefentry>
266         <refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
267       </citerefentry><phrase condition="gshadow">,
268       <citerefentry>
269         <refentrytitle>gshadow</refentrytitle><manvolnum>5</manvolnum>
270       </citerefentry></phrase>.
271     </para>
272   </refsect1>
273 </refentry>