chfn(1) chfn(1)
NAME [Toc] [Back]
chfn - change user information; used by finger
SYNOPSIS [Toc] [Back]
chfn [login-name]
chfn -r files [login-name]
chfn -r nis [login-name]
chfn -r nisplus [login-name]
chfn -r dce [login-name]
DESCRIPTION [Toc] [Back]
The chfn command changes the user information that is stored in the
repository for the current logged-in user or for the user specified by
login-name (see passwd(1)).
The information is organized as four comma-separated subfields within
the reserved (5th) field of the password file entry. It consists of
the user's full name, location code, office phone number, and home
phone number, in that order. This information is used by the finger
command and other programs (see finger(1)).
chfn prompts you for each subfield. The prompt includes a default
value, which is enclosed in brackets. Accept the default value by
pressing the Return key. To enter a blank subfield, type the word
none.
The DCE repository (-r dce) is only available if Integrated Login has
been configured, see auth.adm(1M). If Integrated Login has been
configured, other considerations apply. A user with appropriate DCE
privileges is capable of modifying a user's finger (gecos)
information; this is not dependent upon superuser privileges.
If the repository is not specified; i.e., chfn [login-name], the
finger information is changed in the passwd file only.
Run finger after running chfn to make sure the information was
processed correctly.
Options [Toc] [Back]
The following option is recognized:
-r Specify the repository to which the operation is
to be applied. Supported repositories include
files, nis, nisplus, and dce.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
chfn(1) chfn(1)
Subfield Values [Toc] [Back]
Name Up to 1022 printing characters.
The finger command and other utilities expand
an & found anywhere in this subfield by
substituting the login name for it and
shifting the first letter of the login name
to uppercase. (chfn does not alter the input
&.)
Location Up to 1022 printing characters.
Office Phone Up to 25 printing characters.
finger inserts appropriate hyphens if the
value is all digits.
Home Phone Up to 25 printing characters.
finger inserts appropriate hyphens if the
value is all digits.
Security Restrictions [Toc] [Back]
You must have appropriate privileges to use the optional login-name
argument to change another user's information.
EXAMPLES [Toc] [Back]
The following is a sample run. The user's input is shown in regular
type.
Name [Tracy Simmons]:
Location (Ex: 47U-P5) []: 42L-P1
Office Phone (Ex: 1632) [77777]: 71863
Home Phone (Ex: 9875432) [4085551546]: none
WARNINGS [Toc] [Back]
The encoding of office and extension information is installationdependent.
For historical reasons, the user's name, etc., are stored in the
/etc/passwd file. This is an inappropriate place to store the
information.
Because two users may try to write the passwd file at once, a
synchronization method was developed. On rare occasions, chfn prints
a message that the password file is busy. When this occurs, chfn
sleeps for a short time, then tries to write to the passwd file again.
AUTHOR [Toc] [Back]
chfn was developed by the University of California, Berkeley.
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
chfn(1) chfn(1)
FILES [Toc] [Back]
/etc/passwd
/etc/ptmp
NOTES [Toc] [Back]
The chfn command is a hard link to passwd command. When chfn is
executed, actually the passwd command gets executed with appropriate
arguments to change the user gecos information in the repository
specified in command line. If no repository is specified the gecos
information is changed in /etc/passwd file.
SEE ALSO [Toc] [Back]
chsh(1), finger(1), passwd(1), passwd(4).
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003 [ Back ] |