1 .\" Copyright (c) 1988, 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)chpass.1 8.2 (Berkeley) 12/30/93
33 .\" $FreeBSD: src/usr.bin/chpass/chpass.1,v 1.34 2002/12/24 13:41:47 ru Exp $
42 .Nd add or change user database information
47 .Op Fl e Ar expiretime
54 allows editing of the user database information associated
57 or, by default, the current user.
63 utilities behave identically to
65 (There is only one program.)
67 The information is formatted and supplied to an editor for changes.
69 Only the information that the user is allowed to change is displayed.
71 The options are as follows:
72 .Bl -tag -width indent
74 The super-user is allowed to directly supply a user database
75 entry, in the format specified by
78 This argument must be a colon
80 separated list of all the
81 user database fields, although they may be empty.
82 [Note that this only changes the user database,
83 .Li master.passwd Ns .]
85 The super-user is allowed to directly supply an encrypted password field,
89 [See the discussion in
91 about types of passwords; this option may not be appropriate.]
92 .It Fl e Ar expiretime
93 Change the account expire time.
94 This option is used to set the expire time
95 from a script as if it was done in the interactive editor.
97 Attempt to change the user's shell to
101 Possible display items are as follows:
103 .Bl -tag -width "Other Information:" -compact -offset indent
107 user's encrypted password
110 use this to change a password; use
118 user's general classification
122 account expiration time
126 .\".It Office Location:
127 .\"user's office location (1)
129 .\"user's office phone (1)
131 .\"user's home phone (1)
132 .\".It Other Information:
133 .\"any locally defined parameters for user (1)
135 user's home directory
140 .\"In the actual master.passwd file, these fields are comma-delimited
141 .\"fields embedded in the FullName field.
142 Historically, the so-call
144 field in the user database entry contain the full name plus other information.
145 Only the full name is currently supported.
150 field is the user name used to access the computer account.
154 field contains the encrypted form of the user's password.
157 use this to change a password; use
163 field is the number associated with the
166 Both of these fields should be unique across the system (and often
167 across a group of systems) as they control file access.
169 While it is possible to have multiple entries with identical login names
170 and/or identical user id's, it is usually a mistake to do so. Routines
171 that manipulate these files will often return only one of the multiple
172 entries, and that one by random selection.
176 field is the group that the user will be placed in at login.
179 supports multiple groups (see
181 this field currently has little special meaning.
182 This field may be filled in with either a number or a group name (see
187 field references class descriptions in
189 and is typically used to initialize the user's system resource limits
194 field is the date by which the password must be changed.
198 field is the date on which the account expires.
204 fields should be entered in the form
208 is the month name (the first three characters are sufficient),
210 is the day of the month, and
214 .\"Five fields are available for storing the user's
215 .\".Ar full name , office location ,
218 .\".Ar home telephone
219 .\"numbers and finally
220 .\".Ar other information
221 .\"which is a single comma delimited string to represent any additional
222 .\"gcos fields (typically used for site specific user information).
225 .\"will display the office location and office phone together under the
230 field contains the full name of the user.
236 path name where the user
237 will be placed at login.
241 field is the command interpreter the user prefers.
244 field is empty, the Bourne shell,
247 When altering a login shell, and not the super-user, the user
248 may not change from a non-standard shell or to a non-standard
250 Non-standard is defined as a shell not found in
253 Once the information has been verified,
257 to update the user database.
258 .Sh LOOKUPD AND DIRECTORY SERVICE AWARENESS
259 User database entries (among other things) are under the control of
261 and may be physically located in many different places, including local
264 databases, directory service agents such as LDAP servers and flat file databases
269 is currently limited to changing user database entries in the flat file
270 and local netinfo databases.
274 editor will be used unless the environment variable
278 When the editor terminates, the information is re-read and used to
279 update the user database itself.
280 Only the user, or the super-user, may edit the information associated
285 for an explanation of the impact of setting the
287 environment variable.
289 .Bl -tag -width /etc/master.passwd -compact
290 .It Pa /etc/master.passwd
293 a Version 7 format password file
294 .It Pa /etc/chpass.XXXXXX
295 temporary copy of the password file
297 the list of approved shells
312 .%T "UNIX Password security"
315 User information should (and eventually will) be stored elsewhere.