1 <?xml version="1.0" encoding="UTF-8"?>
3 Copyright (c) 2005 , Tomasz Kłoczko
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 MAX_MEMBERS_PER_GROUP SYSTEM "login.defs.d/MAX_MEMBERS_PER_GROUP.xml">
35 <refentry id='groupmems.8'>
38 <refentrytitle>groupmems</refentrytitle>
39 <manvolnum>8</manvolnum>
40 <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
42 <refnamediv id='name'>
43 <refname>groupmems</refname>
44 <refpurpose>administer members of a user's primary group</refpurpose>
47 <refsynopsisdiv id='synopsis'>
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>
59 <refsect1 id='description'>
60 <title>DESCRIPTION</title>
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).
69 <para>Only the superuser, as administrator, can use
70 <command>groupmems</command> to alter the memberships of other groups.
74 <refsect1 id='options'>
75 <title>OPTIONS</title>
77 The options which apply to the <command>groupmems</command> command
80 <variablelist remap='IP'>
82 <term><option>-a</option>, <option>--add</option> <replaceable>user_name</replaceable></term>
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.
93 <term><option>-d</option>, <option>--delete</option> <replaceable>user_name</replaceable></term>
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
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.
109 <term><option>-g</option>, <option>--group</option> <replaceable>group_name</replaceable></term>
111 <para>The superuser can specify which group membership
117 <term><option>-l</option>, <option>--list</option></term>
119 <para>List the group membership list.</para>
123 <term><option>-p</option>, <option>--purge</option></term>
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.
136 <refsect1 id='setup'>
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
149 $ chmod 2770 groupmems
150 $ chown root.groups groupmems
151 $ groupmems -g groups -a gk4
155 <refsect1 id='configuration'>
156 <title>CONFIGURATION</title>
158 The following configuration variables in
159 <filename>/etc/login.defs</filename> change the behavior of this
163 &MAX_MEMBERS_PER_GROUP;
167 <refsect1 id='files'>
171 <term><filename>/etc/group</filename></term>
173 <para>Group account information.</para>
176 <varlistentry condition="gshadow">
177 <term><filename>/etc/gshadow</filename></term>
179 <para>secure group account information</para>
185 <refsect1 id='see_also'>
186 <title>SEE ALSO</title>
189 <refentrytitle>chfn</refentrytitle><manvolnum>1</manvolnum>
192 <refentrytitle>chsh</refentrytitle><manvolnum>1</manvolnum>
195 <refentrytitle>passwd</refentrytitle><manvolnum>1</manvolnum>
198 <refentrytitle>groupadd</refentrytitle><manvolnum>8</manvolnum>
201 <refentrytitle>groupdel</refentrytitle><manvolnum>8</manvolnum>
204 <refentrytitle>useradd</refentrytitle><manvolnum>8</manvolnum>
207 <refentrytitle>userdel</refentrytitle><manvolnum>8</manvolnum>
210 <refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>