Initial commit for Tizen
[profile/extras/shadow-utils.git] / 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: gpasswd.1.xml 3008 2009-05-26 19:23:40Z nekral-guest $ -->
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       <phrase condition="no_gshadow">
50         administer <filename>/etc/group</filename>
51       </phrase>
52       <phrase condition="gshadow">
53         administer <filename>/etc/group</filename> and
54         <filename>/etc/gshadow</filename>
55       </phrase>
56     </refpurpose>
57   </refnamediv>
58   <!-- body begins here -->
59   <refsynopsisdiv id='synopsis'>
60     <cmdsynopsis>
61       <command>gpasswd</command>
62       <arg choice='opt'>
63         <replaceable>option</replaceable>
64       </arg>
65       <arg choice='plain'>
66         <replaceable>group</replaceable>
67       </arg>
68     </cmdsynopsis>
69   </refsynopsisdiv>
70
71   <refsect1 id='description'>
72     <title>DESCRIPTION</title>
73     <para>
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>.
77       Every group can have
78       <phrase condition="gshadow">administrators,</phrase>
79       members and a password.
80     </para>
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.
85     </para>
86     <para>
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>.
92     </para>
93     <para>
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
97       password.
98     </para>
99
100     <refsect2 id='notes_about_group_passwords'>
101       <title>Notes about group passwords</title>
102       <para>
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.
106       </para>
107     </refsect2>
108
109   </refsect1>
110
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.
116     </para>
117     <para condition="no_gshadow">
118       The options cannot be combined.
119     </para>
120     <para>
121       The options which apply to the <command>gpasswd</command> command are:
122     </para>
123     <variablelist remap='IP'>
124       <varlistentry>
125         <term>
126           <option>-a</option>, <option>--add</option> <replaceable>user</replaceable>
127         </term>
128         <listitem>
129           <para>
130             Add the <replaceable>user</replaceable> to the named
131             <replaceable>group</replaceable>.
132           </para>
133         </listitem>
134       </varlistentry>
135     </variablelist>
136     <variablelist remap='IP'>
137       <varlistentry>
138         <term>
139           <option>-d</option>, <option>--delete</option> <replaceable>user</replaceable>
140         </term>
141         <listitem>
142           <para>
143             Remove the <replaceable>user</replaceable> from the named
144             <replaceable>group</replaceable>.
145           </para>
146         </listitem>
147       </varlistentry>
148     </variablelist>
149     <variablelist remap='IP'>
150       <varlistentry>
151         <term>
152           <option>-r</option>, <option>--remove-password</option>
153         </term>
154         <listitem>
155           <para>
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>.
160           </para>
161         </listitem>
162       </varlistentry>
163     </variablelist>
164     <variablelist remap='IP'>
165       <varlistentry>
166         <term>
167           <option>-R</option>, <option>--restrict</option>
168         </term>
169         <listitem>
170           <para>
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>.
175           </para>
176         </listitem>
177       </varlistentry>
178     </variablelist>
179     <variablelist remap='IP' condition="gshadow">
180       <varlistentry>
181         <term>
182           <option>-A</option>, <option>--administrators</option> <replaceable>user</replaceable>,...
183         </term>
184         <listitem>
185           <para>
186             Set the list of administrative users.
187           </para>
188         </listitem>
189       </varlistentry>
190     </variablelist>
191     <variablelist remap='IP'>
192       <varlistentry>
193         <term>
194           <option>-M</option>, <option>--members</option> <replaceable>user</replaceable>,...
195         </term>
196         <listitem>
197           <para>
198             Set the list of group members.
199           </para>
200         </listitem>
201       </varlistentry>
202     </variablelist>
203   </refsect1>
204
205   <refsect1 id='caveats'>
206     <title>CAVEATS</title>
207     <para>
208       This tool only operates on the <filename>/etc/group</filename>
209       <phrase condition="gshadow"> and <filename>/etc/gshadow</filename>
210       files.</phrase>
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.
214     </para>
215   </refsect1>
216
217   <refsect1 id='configuration'>
218     <title>CONFIGURATION</title>
219     <para>
220       The following configuration variables in
221       <filename>/etc/login.defs</filename> change the behavior of this
222       tool:
223     </para>
224     <variablelist>
225       &ENCRYPT_METHOD;
226       &MAX_MEMBERS_PER_GROUP;
227       &MD5_CRYPT_ENAB;
228       &SHA_CRYPT_MIN_ROUNDS; <!--This also document SHA_CRYPT_MAX_ROUNDS-->
229     </variablelist>
230   </refsect1>
231
232   <refsect1 id='files'>
233     <title>FILES</title>
234     <variablelist>
235       <varlistentry>
236         <term><filename>/etc/group</filename></term>
237         <listitem>
238           <para>Group account information.</para>
239         </listitem>
240       </varlistentry>
241       <varlistentry condition="gshadow">
242         <term><filename>/etc/gshadow</filename></term>
243         <listitem>
244           <para>Secure group account information.</para>
245         </listitem>
246       </varlistentry>
247     </variablelist>
248   </refsect1>
249
250   <refsect1 id='see_also'>
251     <title>SEE ALSO</title>
252     <para>
253       <citerefentry>
254         <refentrytitle>newgrp</refentrytitle><manvolnum>1</manvolnum>
255       </citerefentry>,
256       <citerefentry>
257         <refentrytitle>groupadd</refentrytitle><manvolnum>8</manvolnum>
258       </citerefentry>,
259       <citerefentry>
260         <refentrytitle>groupdel</refentrytitle><manvolnum>8</manvolnum>
261       </citerefentry>,
262       <citerefentry>
263         <refentrytitle>groupmod</refentrytitle><manvolnum>8</manvolnum>
264       </citerefentry>,
265       <citerefentry>
266         <refentrytitle>grpck</refentrytitle><manvolnum>8</manvolnum>
267       </citerefentry>,
268       <citerefentry>
269         <refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
270       </citerefentry><phrase condition="gshadow">,
271       <citerefentry>
272         <refentrytitle>gshadow</refentrytitle><manvolnum>5</manvolnum>
273       </citerefentry></phrase>.
274     </para>
275   </refsect1>
276 </refentry>