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 8 "Feb 25, 2017"
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
27 The \fBpassmgmt\fR command updates information in the password files. This
28 command works with both \fB/etc/passwd\fR and \fB/etc/shadow\fR.
31 \fBpassmgmt\fR \fB-a\fR adds an entry for user \fIname\fR to the password
32 files. This command does not create any directory for the new user and the new
33 login remains locked (with the string \fB*LK*\fR in the password field) until
34 the \fBpasswd\fR(1) command is executed to set the password.
37 \fBpassmgmt\fR \fB-m\fR modifies the entry for user \fIname\fR in the password
38 files. The name field in the \fB/etc/shadow\fR entry and all the fields (except
39 the password field) in the \fB/etc/passwd\fR entry can be modified by this
40 command. Only fields entered on the command line will be modified.
43 \fBpassmgmt\fR \fB-d\fR deletes the entry for user \fIname\fR from the password
44 files. It will not remove any files that the user owns on the system; they must
48 \fBpassmgmt\fR can be used only by the super-user.
52 \fB\fB\fR\fB-c\fR \fIcomment\fR\fR
55 A short description of the login, enclosed in quotes. It is limited to a
56 maximum of 128 characters and defaults to an empty field.
62 \fB\fB-e\fR \fIexpire\fR\fR
65 Specify the expiration date for a login. After this date, no user will be able
66 to access this login. The expire option argument is a date entered using one of
67 the date formats included in the template file \fB/etc/datemsk\fR. See
74 \fB\fB-f\fR \fIinactive\fR\fR
77 The maximum number of days allowed between uses of a login ID before that
78 \fBID\fR is declared invalid. Normal values are positive integers. A value of
79 \fB0\fR defeats the status.
81 Changing the password reactivates an account for the inactivity period.
87 \fB\fB\fR\fB-g\fR \fIgid\fR\fR
90 \fBGID\fR of \fIname\fR. This number must range from 0 to the maximum
91 non-negative value for the system. The default is 1.
97 \fB\fB\fR\fB-h\fR \fIhomedir\fR\fR
100 Home directory of \fIname\fR. It is limited to a maximum of 256 characters and
101 defaults to \fB/usr/\fR\fIname\fR.
107 \fB\fB-K\fR \fIkey=value\fR\fR
110 Set a \fIkey=value\fR pair. See \fBuser_attr\fR(4), \fBauth_attr\fR(4), and
111 \fBprof_attr\fR(4). The valid \fIkey=value\fR pairs are defined in
112 \fBuser_attr\fR(4), but the "type" key is subject to the \fBusermod\fR(8) and
113 \fBrolemod\fR(8) restrictions. Multiple \fIkey=value\fR pairs may be added
114 with multiple \fB-K\fR options.
120 \fB\fB-k\fR \fIskel_dir\fR\fR
123 A directory that contains skeleton information (such as \fB\&.profile\fR) that
124 can be copied into a new user's home directory. This directory must already
125 exist. The system provides the \fB/etc/skel\fR directory that can be used for
132 \fB\fB-l\fR \fIlogname\fR\fR
135 This option changes the \fIname\fR to \fIlogname\fR. It is used only with the
136 \fB-m\fR option. The total size of each login entry is limited to a maximum of
137 511 bytes in each of the password files.
146 This option allows a \fBUID\fR to be non-unique. It is used only with the
153 \fB\fB\fR\fB-s\fR \fIshell\fR\fR
156 Login shell for \fIname\fR. It should be the full pathname of the program that
157 will be executed when the user logs in. The maximum size of \fIshell\fR is 256
158 characters. The default is for this field to be empty and to be interpreted as
165 \fB\fB\fR\fB-u\fR \fIuid\fR\fR
168 \fBUID\fR of the \fIname\fR. This number must range from 0 to the maximum
169 non-negative value for the system. It defaults to the next available \fBUID\fR
170 greater than 99. Without the \fB-o\fR option, it enforces the uniqueness of a
187 See \fBattributes\fR(5) for descriptions of the following attributes:
195 ATTRIBUTE TYPE ATTRIBUTE VALUE
197 Interface Stability Evolving
202 \fBpasswd\fR(1), \fBrolemod\fR(8), \fBuseradd\fR(8), \fBuserdel\fR(8),
203 \fBusermod\fR(8), \fBauth_attr\fR(4), \fBpasswd\fR(4), \fBprof_attr\fR(4),
204 \fBshadow\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5)
207 The \fBpassmgmt\fR command exits with one of the following values:
232 Invalid command syntax. Usage message of the \fBpassmgmt\fR command is
242 Invalid argument provided to option.
260 Inconsistent password files (for example, \fIname\fR is in the
261 \fB/etc/passwd\fR file and not in the \fB/etc/shadow\fR file, or vice versa).
270 Unexpected failure. Password files unchanged.
279 Unexpected failure. Password file(s) missing.
288 Password file(s) busy. Try again later.
297 \fIname\fR does not exist (if \fB-m\fR or \fB-d\fR is specified), already
298 exists (if \fB-a\fR is specified), or \fBlogname\fR already exists (if
299 \fB\fR\fB-m\fR \fB-l\fR is specified).
304 Do not use a colon (\fB:\fR) or \fBRETURN\fR as part of an argument. It is
305 interpreted as a field separator in the password file. The \fBpassmgmt\fR
306 command will be removed in a future release. Its functionality has been
307 replaced and enhanced by \fBuseradd\fR, \fBuserdel\fR, and \fBusermod\fR. These
308 commands are currently available.
311 This command only modifies password definitions in the local \fB/etc/passwd\fR
312 and \fB/etc/shadow\fR files. If a network nameservice
313 is being used to supplement the local files with additional entries,
314 \fBpassmgmt\fR cannot change information supplied by the network nameservice.