|Main index||Section 1||日本語||한국인||Deutsch||Options|
The chfn, chsh, ypchpass, ypchfn and ypchsh utilities behave identically to chpass. (There is only one program.)
The information is formatted and supplied to an editor for changes.
Only the information that the user is allowed to change is displayed.
The options are as follows:
|The super-user is allowed to directly supply a user database entry, in the format specified by passwd(5), as an argument. This argument must be a colon (":") separated list of all the user database fields, although they may be empty.|
|The super-user is allowed to directly supply an encrypted password field, in the format used by crypt(3), as an argument.|
|Change the account expire time. This option is used to set the expire time from a script as if it was done in the interactive editor.|
|Attempt to change the user's shell to newshell.|
Possible display items are as follows:
|Login:||user's login name|
|Password:||user's encrypted password|
|Gid:||user's login group|
|Class:||user's general classification|
|Change:||password change time|
|Expire:||account expiration time|
|Full Name:||user's real name|
|Office Location:||user's office location (1)|
|Office Phone:||user's office phone (1)|
|Home Phone:||user's home phone (1)|
|any locally defined parameters for user (1)|
|Home Directory:||user's home directory|
user's login shell
|NOTE(1) -||In the actual master.passwd file, these fields are comma-delimited fields embedded in the FullName field.|
The login field is the user name used to access the computer account.
The password field contains the encrypted form of the user's password.
The uid field is the number associated with the login field. Both of these fields should be unique across the system (and often across a group of systems) as they control file access.
While it is possible to have multiple entries with identical login names and/or identical user id's, it is usually a mistake to do so. Routines that manipulate these files will often return only one of the multiple entries, and that one by random selection.
The gid field is the group that the user will be placed in at login. Since BSD supports multiple groups (see groups(1)) this field currently has little special meaning. This field may be filled in with either a number or a group name (see group(5)).
The class field references class descriptions in /etc/login.conf and is typically used to initialize the user's system resource limits when they login.
The change field is the date by which the password must be changed.
The expire field is the date on which the account expires.
Both the change and expire fields should be entered in the form "month day year" where month is the month name (the first three characters are sufficient), day is the day of the month, and year is the year.
Five fields are available for storing the user's full name , office location, work and home telephone numbers and finally other information which is a single comma delimited string to represent any additional gecos fields (typically used for site specific user information). Note that finger(1) will display the office location and office phone together under the heading Office:.
The user's home directory is the full Unix path name where the user will be placed at login.
The shell field is the command interpreter the user prefers. If the shell field is empty, the Bourne shell, /bin/sh, is assumed. When altering a login shell, and not the super-user, the user may not change from a non-standard shell or to a non-standard shell. Non-standard is defined as a shell not found in /etc/shells.
Once the information has been verified, chpass uses pwd_mkdb(8) to update the user database.
See pwd_mkdb(8) for an explanation of the impact of setting the PW_SCAN_BIG_IDS environment variable.
Note: these exceptions only apply when the NIS master server is a FreeBSD system).
Consequently, except where noted, the following restrictions apply when chpass is used with NIS:
Exception: the super-user on the NIS master server is permitted to change any field.
Exception: the super-user on the NIS master server is allowed to
submit changes without supplying a password.
(The super-user may
choose to turn off this feature using the
The super-user on the NIS master server is permitted to add new records
to the NIS password maps, provided the
server has been started with the
Exception: the super-user on the NIS master server is permitted to change a user's NIS password with chpass.
There are also a few extra option flags that are available when chpass is compiled with NIS support:
|Force chpass to modify the local copy of a user's password information in the event that a user exists in both the local and NIS databases.|
Opposite effect of
Specify a particular NIS domain.
utility uses the system domain name by default, as set by the
Specify the name or address of an NIS server to query.
will communicate with the NIS master host specified in the
On hosts that have not been configured as NIS clients, there is
no way for the program to determine this information unless the user
provides the hostname of a server.
Note that the specified hostname need
not be that of the NIS master server; the name of any server, master or
slave, in a given NIS domain will do.
When using the
Force the use of RPC-based updates when communicating with
When invoked by the super-user on the NIS master server,
allows unrestricted changes to the NIS passwd maps using dedicated,
non-RPC-based mechanism (in this case, a
|the user database|
|/etc/passwd||a Version 7 format password file|
|temporary copy of the password file|
|/etc/shells||the list of approved shells|
UNIX Password security,, ,
|CHPASS (1)||December 30, 1993|
|Main index||Section 1||日本語||한국인||Deutsch||Options|
Please direct any comments about this manual page service to Ben Bullock.
|“||Modern Unix impedes progress in computer science, wastes billions of dollars, and destroys the common sense of many who seriously use it.||”|
|— The Unix Haters' handbook|