Scroll to navigation

CHFN(1) chfn CHFN(1)

NAME

chfn - change finger information

SYNOPSIS

chfn [option...] [user]

DESCRIPTION

chfn is used to change the user finger information. This are the users fullname, office room number, office phone number and home phone number. This information is stored in the /etc/passwd file and typically printed by tools like finger(1) or pinky(1) and similiar programs. A normal user may only change the fields for their own account, the super user may change the fields for any account. Also, only the super user may use the -o option to change the other portions of the GECOS field.

If no information is given on the command line, chfn operates in an interactive fashion, prompting the user for each field. Enter the new value to change the field, or leave the line blank to use the current value. Enter none or a blank only to remove the old value. The current value is displayed between a pair of [...] marks.

The only restrictions placed on the contents of the fields is that no control characters may be present, nor any of comma, colon, or equal sign. The other field does not have this restriction.

This implementation does not require the setuid bit set, instead it will communicate via varlink protocol with pwaccessd(8) and pwupd(8) to read and modify the account data.

OPTIONS

-f, --full-name

Specify the user's real name.

-o, --office

Specify the user's office room number.

-p, --phone

Specify the user's office phone number.

-h, --home-phone

Specify the user's home phone number.

-o, --other

Specify the other portion of the GECOS field.

-u, --help

Print a more verbose help text and exit.

-v, --version

Print version information and exit.

CONFIGURATION

The following configuration variables provided by login.defs(5) define the behavior of the chfn command:

CHFN_RESTRICT

This parameter specifies which values in the GECOS field may be changed by regular users using the chfn program. It can be any combination of letters f, r, w, h and o for Full name, Room number, Work phone, Home phone and Other. Only the superuser can make changes if not specified.

FILES

/etc/passwd

user account information

SEE ALSO

pwaccessd(8), pwupd(8), finger(1), pinky(1), passwd(5), login.defs(5)

12/17/2025 account-utils 1.0.0