Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / groupmems.8
1 '\" t
2 .\"     Title: groupmems
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5 .\"      Date: 02/16/2011
6 .\"    Manual: System Management Commands
7 .\"    Source: System Management Commands
8 .\"  Language: English
9 .\"
10 .TH "GROUPMEMS" "8" "02/16/2011" "System Management Commands" "System Management Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 groupmems \- administer members of a user\*(Aqs primary group
32 .SH "SYNOPSIS"
33 .HP \w'\fBgroupmems\fR\ 'u
34 \fBgroupmems\fR \-a\ \fIuser_name\fR | \-d\ \fIuser_name\fR | [\-g\ \fIgroup_name\fR] | \-l | \-p 
35 .SH "DESCRIPTION"
36 .PP
37 The
38 \fBgroupmems\fR
39 command allows a user to administer his/her own group membership list without the requirement of superuser privileges\&. The
40 \fBgroupmems\fR
41 utility is for systems that configure its users to be in their own name sake primary group (i\&.e\&., guest / guest)\&.
42 .PP
43 Only the superuser, as administrator, can use
44 \fBgroupmems\fR
45 to alter the memberships of other groups\&.
46 .SH "OPTIONS"
47 .PP
48 The options which apply to the
49 \fBgroupmems\fR
50 command are:
51 .PP
52 \fB\-a\fR, \fB\-\-add\fR \fIuser_name\fR
53 .RS 4
54 Add an user to the group membership list\&.
55 .sp
56 If the
57 /etc/gshadow
58 file exist, and the group has no entry in the
59 /etc/gshadow
60 file, a new entry will be created\&.
61 .RE
62 .PP
63 \fB\-d\fR, \fB\-\-delete\fR \fIuser_name\fR
64 .RS 4
65 Delete a user from the group membership list\&.
66 .sp
67 If the
68 /etc/gshadow
69 file exist, the user will be removed from the list of members and administrators of the group\&.
70 .sp
71 If the
72 /etc/gshadow
73 file exist, and the group has no entry in the
74 /etc/gshadow
75 file, a new entry will be created\&.
76 .RE
77 .PP
78 \fB\-g\fR, \fB\-\-group\fR \fIgroup_name\fR
79 .RS 4
80 The superuser can specify which group membership list to modify\&.
81 .RE
82 .PP
83 \fB\-l\fR, \fB\-\-list\fR
84 .RS 4
85 List the group membership list\&.
86 .RE
87 .PP
88 \fB\-p\fR, \fB\-\-purge\fR
89 .RS 4
90 Purge all users from the group membership list\&.
91 .sp
92 If the
93 /etc/gshadow
94 file exist, and the group has no entry in the
95 /etc/gshadow
96 file, a new entry will be created\&.
97 .RE
98 .SH "SETUP"
99 .PP
100 The
101 \fBgroupmems\fR
102 executable should be in mode
103 2770
104 as user
105 \fIroot\fR
106 and in group
107 \fIgroups\fR\&. The system administrator can add users to group
108 \fIgroups\fR
109 to allow or disallow them using the
110 \fBgroupmems\fR
111 utility to manage their own group membership list\&.
112 .sp
113 .if n \{\
114 .RS 4
115 .\}
116 .nf
117         $ groupadd \-r groups
118         $ chmod 2770 groupmems
119         $ chown root\&.groups groupmems
120         $ groupmems \-g groups \-a gk4
121     
122 .fi
123 .if n \{\
124 .RE
125 .\}
126 .SH "CONFIGURATION"
127 .PP
128 The following configuration variables in
129 /etc/login\&.defs
130 change the behavior of this tool:
131 .PP
132 \fBMAX_MEMBERS_PER_GROUP\fR (number)
133 .RS 4
134 Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in
135 /etc/group
136 (with the same name, same password, and same GID)\&.
137 .sp
138 The default value is 0, meaning that there are no limits in the number of members in a group\&.
139 .sp
140 This feature (split group) permits to limit the length of lines in the group file\&. This is useful to make sure that lines for NIS groups are not larger than 1024 characters\&.
141 .sp
142 If you need to enforce such limit, you can use 25\&.
143 .sp
144 Note: split groups may not be supported by all tools (even in the Shadow toolsuite)\&. You should not use this variable unless you really need it\&.
145 .RE
146 .SH "FILES"
147 .PP
148 /etc/group
149 .RS 4
150 Group account information\&.
151 .RE
152 .PP
153 /etc/gshadow
154 .RS 4
155 secure group account information
156 .RE
157 .SH "SEE ALSO"
158 .PP
159
160 \fBchfn\fR(1),
161 \fBchsh\fR(1),
162 \fBpasswd\fR(1),
163 \fBgroupadd\fR(8),
164 \fBgroupdel\fR(8),
165 \fBuseradd\fR(8),
166 \fBuserdel\fR(8),
167 \fBusermod\fR(8)\&.