2 .\" Copyright 1989 AT&T Copyright (c) 2007 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 PASSMGMT 1M "Aug 27, 2007"
8 passmgmt \- password files management
12 \fBpassmgmt\fR \fB-a\fR \fIoptions\fR \fIname\fR
17 \fBpassmgmt\fR \fB-m\fR \fIoptions\fR \fIname\fR
22 \fBpassmgmt\fR \fB-d\fR \fIname\fR
28 The \fBpassmgmt\fR command updates information in the password files. This
29 command works with both \fB/etc/passwd\fR and \fB/etc/shadow\fR.
32 \fBpassmgmt\fR \fB-a\fR adds an entry for user \fIname\fR to the password
33 files. This command does not create any directory for the new user and the new
34 login remains locked (with the string \fB*LK*\fR in the password field) until
35 the \fBpasswd\fR(1) command is executed to set the password.
38 \fBpassmgmt\fR \fB-m\fR modifies the entry for user \fIname\fR in the password
39 files. The name field in the \fB/etc/shadow\fR entry and all the fields (except
40 the password field) in the \fB/etc/passwd\fR entry can be modified by this
41 command. Only fields entered on the command line will be modified.
44 \fBpassmgmt\fR \fB-d\fR deletes the entry for user \fIname\fR from the password
45 files. It will not remove any files that the user owns on the system; they must
49 \fBpassmgmt\fR can be used only by the super-user.
54 \fB\fB\fR\fB-c\fR \fIcomment\fR\fR
57 A short description of the login, enclosed in quotes. It is limited to a
58 maximum of 128 characters and defaults to an empty field.
64 \fB\fB-e\fR \fIexpire\fR\fR
67 Specify the expiration date for a login. After this date, no user will be able
68 to access this login. The expire option argument is a date entered using one of
69 the date formats included in the template file \fB/etc/datemsk\fR. See
76 \fB\fB-f\fR \fIinactive\fR\fR
79 The maximum number of days allowed between uses of a login ID before that
80 \fBID\fR is declared invalid. Normal values are positive integers. A value of
81 \fB0\fR defeats the status.
83 Changing the password reactivates an account for the inactivity period.
89 \fB\fB\fR\fB-g\fR \fIgid\fR\fR
92 \fBGID\fR of \fIname\fR. This number must range from 0 to the maximum
93 non-negative value for the system. The default is 1.
99 \fB\fB\fR\fB-h\fR \fIhomedir\fR\fR
102 Home directory of \fIname\fR. It is limited to a maximum of 256 characters and
103 defaults to \fB/usr/\fR\fIname\fR.
109 \fB\fB-K\fR \fIkey=value\fR\fR
112 Set a \fIkey=value\fR pair. See \fBuser_attr\fR(4), \fBauth_attr\fR(4), and
113 \fBprof_attr\fR(4). The valid \fIkey=value\fR pairs are defined in
114 \fBuser_attr\fR(4), but the "type" key is subject to the \fBusermod\fR(1M) and
115 \fBrolemod\fR(1M) restrictions. Multiple \fIkey=value\fR pairs may be added
116 with multiple \fB-K\fR options.
122 \fB\fB-k\fR \fIskel_dir\fR\fR
125 A directory that contains skeleton information (such as \fB\&.profile\fR) that
126 can be copied into a new user's home directory. This directory must already
127 exist. The system provides the \fB/etc/skel\fR directory that can be used for
134 \fB\fB-l\fR \fIlogname\fR\fR
137 This option changes the \fIname\fR to \fIlogname\fR. It is used only with the
138 \fB-m\fR option. The total size of each login entry is limited to a maximum of
139 511 bytes in each of the password files.
148 This option allows a \fBUID\fR to be non-unique. It is used only with the
155 \fB\fB\fR\fB-s\fR \fIshell\fR\fR
158 Login shell for \fIname\fR. It should be the full pathname of the program that
159 will be executed when the user logs in. The maximum size of \fIshell\fR is 256
160 characters. The default is for this field to be empty and to be interpreted as
167 \fB\fB\fR\fB-u\fR \fIuid\fR\fR
170 \fBUID\fR of the \fIname\fR. This number must range from 0 to the maximum
171 non-negative value for the system. It defaults to the next available \fBUID\fR
172 greater than 99. Without the \fB-o\fR option, it enforces the uniqueness of a
191 See \fBattributes\fR(5) for descriptions of the following attributes:
199 ATTRIBUTE TYPE ATTRIBUTE VALUE
201 Interface Stability Evolving
207 \fBpasswd\fR(1), \fBrolemod\fR(1M), \fBuseradd\fR(1M), \fBuserdel\fR(1M),
208 \fBusermod\fR(1M), \fBauth_attr\fR(4), \fBpasswd\fR(4), \fBprof_attr\fR(4),
209 \fBshadow\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5)
213 The \fBpassmgmt\fR command exits with one of the following values:
238 Invalid command syntax. Usage message of the \fBpassmgmt\fR command is
248 Invalid argument provided to option.
266 Inconsistent password files (for example, \fIname\fR is in the
267 \fB/etc/passwd\fR file and not in the \fB/etc/shadow\fR file, or vice versa).
276 Unexpected failure. Password files unchanged.
285 Unexpected failure. Password file(s) missing.
294 Password file(s) busy. Try again later.
303 \fIname\fR does not exist (if \fB-m\fR or \fB-d\fR is specified), already
304 exists (if \fB-a\fR is specified), or \fBlogname\fR already exists (if
305 \fB\fR\fB-m\fR \fB-l\fR is specified).
311 Do not use a colon (\fB:\fR) or \fBRETURN\fR as part of an argument. It is
312 interpreted as a field separator in the password file. The \fBpassmgmt\fR
313 command will be removed in a future release. Its functionality has been
314 replaced and enhanced by \fBuseradd\fR, \fBuserdel\fR, and \fBusermod\fR. These
315 commands are currently available.
318 This command only modifies password definitions in the local \fB/etc/passwd\fR
319 and \fB/etc/shadow\fR files. If a network nameservice such as \fBNIS\fR or
320 \fBNIS+\fR is being used to supplement the local files with additional entries,
321 \fBpassmgmt\fR cannot change information supplied by the network nameservice.