Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / groupmems.8.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 2005       , Tomasz Kłoczko
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 MAX_MEMBERS_PER_GROUP SYSTEM "login.defs.d/MAX_MEMBERS_PER_GROUP.xml">
34 ]>
35 <refentry id='groupmems.8'>
36   <!-- $Id: groupmems.8.xml 2491 2009-03-07 16:30:49Z nekral-guest $ -->
37   <refmeta>
38     <refentrytitle>groupmems</refentrytitle>
39     <manvolnum>8</manvolnum>
40     <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
41   </refmeta>
42   <refnamediv id='name'>
43     <refname>groupmems</refname>
44     <refpurpose>administer members of a user's primary group</refpurpose>
45   </refnamediv>
46
47   <refsynopsisdiv id='synopsis'>
48     <cmdsynopsis>
49       <command>groupmems</command>
50       <group choice='plain'>
51         <arg choice='plain'>-a <replaceable>user_name</replaceable></arg>
52         <arg choice='plain'>-d <replaceable>user_name</replaceable></arg>
53         <arg choice='opt'>-g <replaceable>group_name</replaceable></arg>
54         <arg choice='plain'>-l </arg><arg choice='plain'>-p </arg>
55       </group>
56     </cmdsynopsis>
57   </refsynopsisdiv>
58
59   <refsect1 id='description'>
60     <title>DESCRIPTION</title>
61     <para>
62       The <command>groupmems</command> command allows a user to administer
63       his/her own group membership list without the requirement of
64       superuser privileges. The <command>groupmems</command> utility is for
65       systems that configure its users to be in their own name sake primary
66       group (i.e., guest / guest).
67     </para>
68
69     <para>Only the superuser, as administrator, can use
70       <command>groupmems</command> to alter the memberships of other groups.
71     </para>
72   </refsect1>
73
74   <refsect1 id='options'>
75     <title>OPTIONS</title>
76     <para>
77       The options which apply to the <command>groupmems</command> command
78       are:
79     </para>
80     <variablelist remap='IP'>
81       <varlistentry>
82         <term><option>-a</option>, <option>--add</option> <replaceable>user_name</replaceable></term>
83         <listitem>
84           <para>Add an user to the group membership list.</para>
85           <para condition="gshadow">
86             If the <filename>/etc/gshadow</filename> file exist, and the
87             group has no entry in the <filename>/etc/gshadow</filename>
88             file, a new entry will be created.
89           </para>
90         </listitem>
91       </varlistentry>
92       <varlistentry>
93         <term><option>-d</option>, <option>--delete</option> <replaceable>user_name</replaceable></term>
94         <listitem>
95           <para>Delete a user from the group membership list.</para>
96           <para condition="gshadow">
97             If the <filename>/etc/gshadow</filename> file exist, the user
98             will be removed from the list of members and administrators of
99             the group.
100           </para>
101           <para condition="gshadow">
102             If the <filename>/etc/gshadow</filename> file exist, and the
103             group has no entry in the <filename>/etc/gshadow</filename>
104             file, a new entry will be created.
105           </para>
106         </listitem>
107       </varlistentry>
108       <varlistentry>
109         <term><option>-g</option>, <option>--group</option> <replaceable>group_name</replaceable></term>
110         <listitem>
111           <para>The superuser can specify which group membership
112             list to modify.
113           </para>
114         </listitem>
115       </varlistentry>
116       <varlistentry>
117         <term><option>-l</option>, <option>--list</option></term>
118         <listitem>
119           <para>List the group membership list.</para>
120         </listitem>
121       </varlistentry>
122       <varlistentry>
123         <term><option>-p</option>, <option>--purge</option></term>
124         <listitem>
125           <para>Purge all users from the group membership list.</para>
126           <para condition="gshadow">
127             If the <filename>/etc/gshadow</filename> file exist, and the
128             group has no entry in the <filename>/etc/gshadow</filename>
129             file, a new entry will be created.
130           </para>
131         </listitem>
132       </varlistentry>
133     </variablelist>
134   </refsect1>
135
136   <refsect1 id='setup'>
137     <title>SETUP</title>
138     <para>
139       The <command>groupmems</command> executable should be in mode
140       <literal>2770</literal> as user <emphasis>root</emphasis> and in group
141       <emphasis>groups</emphasis>. The system administrator can add users to
142       group <emphasis>groups</emphasis> to allow or disallow them using the
143       <command>groupmems</command> utility to manage their own group
144       membership list.
145     </para>
146
147     <programlisting>
148         $ groupadd -r groups
149         $ chmod 2770 groupmems
150         $ chown root.groups groupmems
151         $ groupmems -g groups -a gk4
152     </programlisting>
153   </refsect1>
154
155   <refsect1 id='configuration'>
156     <title>CONFIGURATION</title>
157     <para>
158       The following configuration variables in
159       <filename>/etc/login.defs</filename> change the behavior of this
160       tool:
161     </para>
162     <variablelist>
163       &MAX_MEMBERS_PER_GROUP;
164     </variablelist>
165   </refsect1>
166
167   <refsect1 id='files'>
168     <title>FILES</title>
169     <variablelist>
170       <varlistentry>
171         <term><filename>/etc/group</filename></term>
172         <listitem>
173           <para>Group account information.</para>
174         </listitem>
175       </varlistentry>
176       <varlistentry condition="gshadow">
177         <term><filename>/etc/gshadow</filename></term>
178         <listitem>
179           <para>secure group account information</para>
180         </listitem>
181       </varlistentry>
182     </variablelist>
183   </refsect1>
184
185   <refsect1 id='see_also'>
186     <title>SEE ALSO</title>
187     <para>
188       <citerefentry>
189         <refentrytitle>chfn</refentrytitle><manvolnum>1</manvolnum>
190       </citerefentry>,
191       <citerefentry>
192         <refentrytitle>chsh</refentrytitle><manvolnum>1</manvolnum>
193       </citerefentry>,
194       <citerefentry>
195         <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
196       </citerefentry>,
197       <citerefentry>
198         <refentrytitle>groupadd</refentrytitle><manvolnum>8</manvolnum>
199       </citerefentry>,
200       <citerefentry>
201         <refentrytitle>groupdel</refentrytitle><manvolnum>8</manvolnum>
202       </citerefentry>,
203       <citerefentry>
204         <refentrytitle>useradd</refentrytitle><manvolnum>8</manvolnum>
205       </citerefentry>,
206       <citerefentry>
207         <refentrytitle>userdel</refentrytitle><manvolnum>8</manvolnum>
208       </citerefentry>,
209       <citerefentry>
210         <refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>
211       </citerefentry>.
212     </para>
213   </refsect1>
214 </refentry>