CHFN (1) User command CHFN (1)
Name
CHFN-Change your real name and information
Outline
CHFN [options] [login]
Describe
The CHFN command changes user fullname, office number, office
Phone number, and home phone number information for a user's account.
This information was typically printed by finger (1) and similar
Programs. A Normal user may have the change of the own account,
Subject to the restrictions in/etc/login.defs. (The default
Configuration is to prevent users from changing their fullname.) The
Superuser any field for any account. Additionally, only the
Superuser the-o option to change the undefined portions of the
GECOS field.
These fields must no contain any colons. Except for the other field,
They should not contain any comma or equal sign. It is also recommended
To avoid non-us-ascii characters, it is only enforced for the
Phone numbers. The other field was used to store accounting information
Used by other applications.
Options
The options that the CHFN command can accept are:
-F,--full-namefull_name
Change a user's full name
-H,--home-phonehome_phone
Change the user's home phone number.
-R,--roomroom_number
-W,--work-phonework_phone
Change the user ' s office phone number.
-O,--otherother
Change the user's other GECOS information. This field was used to
Store accounting information used by other applications, and can be
Changed only by a superuser.
-R,--rootchroot_dir
Apply changes in the Chroot_dir directory and use the configuration
Files from the Chroot_dir directory.
-U,--help
Real-world Help information and exit.
If None of the options is selected, CHFN operates in an interactive
Fashion, prompting the user with the
Fields. Enter the new value to change the field, or leave the line
Blank to use the current value. The current value is displayed between
A pair of [] marks. Without options, Chfn prompts for the current user
Account.
Configuration file
There are configuration variables in/etc/login.defs that can be used to change the behavior of this tool:
Chfn_restrict (String)
This parameter specifies which values in the Gecos field of the
/etc/passwd file May is changed by regular users using the CHFN
Program. It can combination of letters F, R, W, H, for-full
Name, number, work phone, and Home phone, respectively. For
Backward compatibility, yes equivalent to RWH and no are
Equivalent to FRWH. If not specified, only the superuser can make
Any changes. The most restrictive setting are better achieved by not
Installing CHFN SUID.
File
/etc/login.defs
Shadow Cipher Suite configuration.
/etc/passwd
User account information.
See
Chsh (1), Login.defs (5), passwd (5).
Shadow-utils 4.1.5.1 2014-02-17 CHFN (1)
Linux--CHFN