1passmgmt(1M)            System Administration Commands            passmgmt(1M)
2
3
4

NAME

6       passmgmt - password files management
7

SYNOPSIS

9       passmgmt -a options name
10
11
12       passmgmt -m options name
13
14
15       passmgmt -d name
16
17

DESCRIPTION

19       The  passmgmt  command  updates information in the password files. This
20       command works with both /etc/passwd and /etc/shadow.
21
22
23       passmgmt -a adds an entry for user name to  the  password  files.  This
24       command  does  not  create  any  directory for the new user and the new
25       login remains locked (with the string *LK* in the password field) until
26       the passwd(1) command is executed to set the password.
27
28
29       passmgmt -m modifies the entry for user name in the password files. The
30       name field in the /etc/shadow entry and  all  the  fields  (except  the
31       password  field)  in the /etc/passwd entry can be modified by this com‐
32       mand. Only fields entered on the command line will be modified.
33
34
35       passmgmt -d deletes the entry for user name from the password files. It
36       will  not  remove any files that the user owns on the system; they must
37       be removed manually.
38
39
40       passmgmt can be used only by the super-user.
41

OPTIONS

43       -c comment      A short description of the login, enclosed  in  quotes.
44                       It  is  limited  to  a  maximum  of  128 characters and
45                       defaults to an empty field.
46
47
48       -e expire       Specify the expiration date for  a  login.  After  this
49                       date,  no  user  will be able to access this login. The
50                       expire option argument is a date entered using  one  of
51                       the   date   formats  included  in  the  template  file
52                       /etc/datemsk. See getdate(3C).
53
54
55       -f inactive     The maximum number of days allowed between  uses  of  a
56                       login  ID  before  that  ID is declared invalid. Normal
57                       values are positive integers. A value of 0 defeats  the
58                       status.
59
60                       Changing  the  password  reactivates an account for the
61                       inactivity period.
62
63
64       -g gid          GID of name. This number must range from 0 to the maxi‐
65                       mum  non-negative  value for the system. The default is
66                       1.
67
68
69       -h homedir      Home directory of name. It is limited to a  maximum  of
70                       256 characters and defaults to /usr/name.
71
72
73       -K key=value    Set  a  key=value pair. See user_attr(4), auth_attr(4),
74                       and prof_attr(4). The valid key=value pairs are defined
75                       in  user_attr(4),  but the "type" key is subject to the
76                       usermod(1M)  and  rolemod(1M)  restrictions.   Multiple
77                       key=value pairs may be added with multiple -K options.
78
79
80       -k skel_dir     A directory that contains skeleton information (such as
81                       .profile) that can be copied into  a  new  user's  home
82                       directory.  This directory must already exist. The sys‐
83                       tem provides the /etc/skel directory that can  be  used
84                       for this purpose.
85
86
87       -l logname      This  option  changes  the  name to logname. It is used
88                       only with the -m option. The total size of  each  login
89                       entry  is  limited to a maximum of 511 bytes in each of
90                       the password files.
91
92
93       -o              This option allows a UID to be non-unique. It  is  used
94                       only with the -u option.
95
96
97       -s shell        Login shell for name. It should be the full pathname of
98                       the program that will be executed when  the  user  logs
99                       in.  The  maximum  size of shell is 256 characters. The
100                       default is for this field to be empty and to be  inter‐
101                       preted as /usr/bin/sh.
102
103
104       -u uid          UID  of  the name. This number must range from 0 to the
105                       maximum non-negative value for the system. It  defaults
106                       to  the next available UID greater than 99. Without the
107                       -o option, it enforces the uniqueness of a UID.
108
109

FILES

111         /etc/passwd
112         /etc/shadow
113         /etc/opasswd
114         /etc/oshadow
115
116
117

ATTRIBUTES

119       See attributes(5) for descriptions of the following attributes:
120
121
122
123
124       ┌─────────────────────────────┬─────────────────────────────┐
125       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
126       ├─────────────────────────────┼─────────────────────────────┤
127       │Availability                 │SUNWcsu                      │
128       ├─────────────────────────────┼─────────────────────────────┤
129       │Interface Stability          │Evolving                     │
130       └─────────────────────────────┴─────────────────────────────┘
131

SEE ALSO

133       passwd(1),   rolemod(1M),   useradd(1M),   userdel(1M),    usermod(1M),
134       auth_attr(4),   passwd(4),   prof_attr(4),   shadow(4),   user_attr(4),
135       attributes(5)
136

EXIT STATUS

138       The passmgmt command exits with one of the following values:
139
140       0    Success.
141
142
143       1    Permission denied.
144
145
146       2    Invalid command syntax. Usage message of the passmgmt  command  is
147            displayed.
148
149
150       3    Invalid argument provided to option.
151
152
153       4    UID in use.
154
155
156       5    Inconsistent   password   files  (for  example,  name  is  in  the
157            /etc/passwd file and not in the /etc/shadow file, or vice versa).
158
159
160       6    Unexpected failure. Password files unchanged.
161
162
163       7    Unexpected failure. Password file(s) missing.
164
165
166       8    Password file(s) busy. Try again later.
167
168
169       9    name does not exist (if -m or -d is specified), already exists (if
170            -a  is  specified),  or logname already exists (if -m -l is speci‐
171            fied).
172
173

NOTES

175       Do not use a colon (:) or RETURN as part of an argument. It  is  inter‐
176       preted  as a field separator in the password file. The passmgmt command
177       will be removed  in  a  future  release.  Its  functionality  has  been
178       replaced  and enhanced by useradd, userdel, and usermod. These commands
179       are currently available.
180
181
182       This  command  only  modifies  password  definitions   in   the   local
183       /etc/passwd and /etc/shadow files. If a network nameservice such as NIS
184       or NIS+ is being used to supplement the  local  files  with  additional
185       entries,  passmgmt  cannot  change  information supplied by the network
186       nameservice.
187
188
189
190SunOS 5.11                        27 Aug 2007                     passmgmt(1M)
Impressum