6253 F_GETLK doesn't always return lock owner
[illumos-gate.git] / usr / src / man / man1m / rolemod.1m
blob9e557af646977d61e1ab7215821be524137dcfbe
1 '\" te
2 .\"  Copyright 1989 AT&T Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ROLEMOD 1M "Dec 10, 2008"
7 .SH NAME
8 rolemod \- modify a role's login information on the system
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBrolemod\fR [\fB-u\fR \fIuid\fR [\fB-o\fR]] [\fB-g\fR \fIgroup\fR] [\fB-G\fR \fIgroup\fR [, \fIgroup\fR...]]
13      [\fB-d\fR \fIdir\fR [\fB-m\fR]] [\fB-s\fR \fIshell\fR] [\fB-c\fR \fIcomment\fR] [\fB-l\fR \fInew_name\fR]
14      [\fB-f\fR \fIinactive\fR] [\fB-e\fR \fIexpire\fR]
15      [\fB-A\fR \fIauthorization\fR [, \fIauthorization\fR]]
16      [\fB-P\fR \fIprofile\fR [, \fIprofile\fR]] [\fB-K\fR \fIkey=value\fR] \fIrole\fR
17 .fi
19 .SH DESCRIPTION
20 .sp
21 .LP
22 The \fBrolemod\fR utility modifies a role's login information on the system. It
23 changes the definition of the specified login and makes the appropriate
24 login-related system file and file system changes.
25 .sp
26 .LP
27 The system file entries created with this command have a limit of 512
28 characters per line. Specifying long arguments to several options may exceed
29 this limit.
30 .SH OPTIONS
31 .sp
32 .LP
33 The following options are supported:
34 .sp
35 .ne 2
36 .na
37 \fB\fB-A\fR \fIauthorization\fR\fR
38 .ad
39 .sp .6
40 .RS 4n
41 One or more comma separated authorizations as deined in \fBauth_attr\fR(4).
42 Only role with \fBgrant\fR rights to the \fBauthorization\fR can assign it to
43 an account. This replaces any existing authorization setting. If no
44 authorization list is specified, the existing setting is removed.
45 .RE
47 .sp
48 .ne 2
49 .na
50 \fB\fB-c\fR \fIcomment\fR\fR
51 .ad
52 .sp .6
53 .RS 4n
54 Specify a comment string. \fIcomment\fR can be any text string. It is generally
55 a short description of the login, and is currently used as the field for the
56 user's full name. This information is stored in the user's \fB/etc/passwd\fR
57 entry.
58 .RE
60 .sp
61 .ne 2
62 .na
63 \fB\fB-d\fR \fIdir\fR\fR
64 .ad
65 .sp .6
66 .RS 4n
67 Specify the new home directory of the role. It defaults to
68 \fIbase_dir/login\fR, where \fIbase_dir\fR is the base directory for new login
69 home directories, and \fBlogin\fR is the new login.
70 .RE
72 .sp
73 .ne 2
74 .na
75 \fB\fB-e\fR \fIexpire\fR\fR
76 .ad
77 .sp .6
78 .RS 4n
79 Specify the expiration date for a role. After this date, no role will be able
80 to access this login. The expire option argument is a date entered using one of
81 the date formats included in the template file \fB/etc/datemsk\fR. See
82 \fBgetdate\fR(3C).
83 .sp
84 For example, you may enter \fB10/6/90\fR or \fBOctober 6, 1990\fR. A value of
85 \fB`` ''\fR defeats the status of the expired date.
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fB-f\fR \fIinactive\fR\fR
92 .ad
93 .sp .6
94 .RS 4n
95 Specify the maximum number of days allowed between uses of a login \fBID\fR
96 before that login \fBID\fR is declared invalid. Normal values are positive
97 integers. A value of \fB0\fR defeats the status.
98 .RE
101 .ne 2
103 \fB\fB-g\fR \fIgroup\fR\fR
105 .sp .6
106 .RS 4n
107 Specify an existing group's integer \fBID\fR or character-string name. It
108 redefines the role's primary group membership.
112 .ne 2
114 \fB\fB-G\fR \fIgroup\fR\fR
116 .sp .6
117 .RS 4n
118 Specify an existing group's integer ID or character string name. It redefines
119 the role's supplementary group membership. Duplicates between \fIgroup\fR with
120 the \fB-g\fR and \fB-G\fR options are ignored. No more than \fBNGROUPS_UMAX\fR
121 groups may be specified as defined in \fB<param.h>\fR\&.
125 .ne 2
127 \fB\fB-K\fR \fIkey=value\fR\fR
129 .sp .6
130 .RS 4n
131 Replace existing or add to a role's \fIkey=value\fR pair attributes. Multiple
132 \fB-K\fR options can be used to replace or add multiple \fIkey=value\fR pairs.
133 However, keys must not be repeated. The generic \fB-K\fR option with the
134 appropriate key may be used instead of the specific implied key options
135 (\fB-A\fR and \fB-P\fR). See \fBuser_attr\fR(4) for a list of valid
136 \fIkey=value\fR pairs.
138 The keyword \fBtype\fR can be specified with the value \fBrole\fR or the value
139 \fBnormal\fR. When using the value \fBnormal\fR, the account changes from a
140 role user to a normal user; using the value \fBrole\fR keeps the account a role
141 user.
145 .ne 2
147 \fB\fB-l\fR \fInew_logname\fR\fR
149 .sp .6
150 .RS 4n
151 Specify the new login name for the role. The \fInew_logname\fR argument is a
152 string no more than eight bytes consisting of characters from the set of
153 alphabetic characters, numeric characters, period (\fB\&.\fR), underline
154 (\fB_\fR), and hypen (\fB\(mi\fR). The first character should be alphabetic and
155 the field should contain at least one lower case alphabetic character. A
156 warning message will be written if these restrictions are not met. A future
157 Solaris release may refuse to accept login fields that do not meet these
158 requirements. The \fInew_logname\fR argument must contain at least one
159 character and must not contain a colon (\fB:\fR) or \fBNEWLINE\fR (\fB\en\fR).
163 .ne 2
165 \fB\fB-m\fR\fR
167 .sp .6
168 .RS 4n
169 Move the role's home directory to the new directory specified with the \fB-d\fR
170 option. If the directory already exists, it must have permissions
171 read/write/execute by \fIgroup\fR, where \fIgroup\fR is the role's primary
172 group.
176 .ne 2
178 \fB\fB-o\fR\fR
180 .sp .6
181 .RS 4n
182 This option allows the specified \fBUID\fR to be duplicated (non-unique).
186 .ne 2
188 \fB\fB-P\fR \fIprofile\fR\fR
190 .sp .6
191 .RS 4n
192 One or more comma-separated execution profiles defined in \fBauth_attr\fR(4).
193 This replaces any existing profile setting. If no profile list is specified,
194 the existing setting is removed.
198 .ne 2
200 \fB\fB-s\fR \fIshell\fR\fR
202 .sp .6
203 .RS 4n
204 Specify the full pathname of the program that is used as the role's shell on
205 login. The value of \fIshell\fR must be a valid executable file.
209 .ne 2
211 \fB\fB-u\fR \fIuid\fR\fR
213 .sp .6
214 .RS 4n
215 Specify a new \fBUID\fR for the role. It must be a non-negative decimal integer
216 less than \fBMAXUID\fR as defined in \fB<param.h>\fR\&. The \fBUID\fR
217 associated with the role's home directory is not modified with this option; a
218 role will not have access to their home directory until the \fBUID\fR is
219 manually reassigned using \fBchown\fR(1).
222 .SH OPERANDS
225 The following operands are supported:
227 .ne 2
229 \fB\fBlogin\fR\fR
231 .sp .6
232 .RS 4n
233 An existing login name to be modified.
236 .SH EXIT STATUS
239 In case of an error, \fBrolemod\fR prints an error message and exits with one
240 of the following values:
242 .ne 2
244 \fB\fB2\fR\fR
246 .sp .6
247 .RS 4n
248 The command syntax was invalid. A usage message for the \fBrolemod\fR command
249 is displayed.
253 .ne 2
255 \fB\fB3\fR\fR
257 .sp .6
258 .RS 4n
259 An invalid argument was provided to an option.
263 .ne 2
265 \fB\fB4\fR\fR
267 .sp .6
268 .RS 4n
269 The \fIuid\fR given with the \fB-u\fR option is already in use.
273 .ne 2
275 \fB\fB5\fR\fR
277 .sp .6
278 .RS 4n
279 The password files contain an error. \fBpwconv\fR(1M) can be used to correct
280 possible errors. See \fBpasswd\fR(4).
284 .ne 2
286 \fB\fB6\fR\fR
288 .sp .6
289 .RS 4n
290 The login to be modified does not exist, the \fIgroup\fR does not exist, or the
291 login shell does not exist.
295 .ne 2
297 \fB\fB8\fR\fR
299 .sp .6
300 .RS 4n
301 The login to be modified is in use.
305 .ne 2
307 \fB\fB9\fR\fR
309 .sp .6
310 .RS 4n
311 The \fInew_logname\fR is already in use.
315 .ne 2
317 \fB\fB10\fR\fR
319 .sp .6
320 .RS 4n
321 Cannot update the \fB/etc/group\fR or \fB/etc/user_attr\fR file. Other update
322 requests will be implemented.
326 .ne 2
328 \fB\fB11\fR\fR
330 .sp .6
331 .RS 4n
332 Insufficient space to move the home directory (\fB-m\fR option). Other update
333 requests will be implemented.
337 .ne 2
339 \fB\fB12\fR\fR
341 .sp .6
342 .RS 4n
343 Unable to complete the move of the home directory to the new home directory.
346 .SH FILES
348 .ne 2
350 \fB\fB/etc/group\fR\fR
352 .sp .6
353 .RS 4n
354 system file containing group definitions
358 .ne 2
360 \fB\fB/etc/datemsk\fR\fR
362 .sp .6
363 .RS 4n
364 system file of date formats
368 .ne 2
370 \fB\fB/etc/passwd\fR\fR
372 .sp .6
373 .RS 4n
374 system password file
378 .ne 2
380 \fB\fB/etc/shadow\fR\fR
382 .sp .6
383 .RS 4n
384 system file containing users' and roles' encrypted passwords and related
385 information
389 .ne 2
391 \fB\fB/etc/user_attr\fR\fR
393 .sp .6
394 .RS 4n
395 system file containing additional user and role attributes
398 .SH ATTRIBUTES
401 See \fBattributes\fR(5) for descriptions of the following attributes:
406 box;
407 c | c
408 l | l .
409 ATTRIBUTE TYPE  ATTRIBUTE VALUE
411 Interface Stability     Evolving
414 .SH SEE ALSO
417 \fBchown\fR(1), \fBpasswd\fR(1), \fBusers\fR(1B), \fBgroupadd\fR(1M),
418 \fBgroupdel\fR(1M), \fBgroupmod\fR(1M), \fBlogins\fR(1M), \fBpwconv\fR(1M),
419 \fBroleadd\fR(1M), \fBroledel\fR(1M), \fBuseradd\fR(1M), \fBuserdel\fR(1M),
420 \fBusermod\fR(1M), \fBgetdate\fR(3C), \fBauth_attr\fR(4), \fBpasswd\fR(4),
421 \fBattributes\fR(5)