Free tools Windows power users keep installed
One-click scans. No signup required.
chfn changes the finger information attached to a Linux user account: the full name, office room, office phone, and home phone. Run it without options to answer interactive prompts, or use options such as -f and -p to set fields directly. Whether a field can be changed depends on your permissions, the system’s CHFN_RESTRICT setting, and how the account is managed.
What does chfn change?
The name comes from “change finger information.” The command edits account details associated with the GECOS field in /etc/passwd. Traditionally, the finger program displays this information. The four fields are full name, office room, office phone, and home phone.
These are descriptive account details, not login credentials. Changing them does not change the username or password.
How to use chfn
The util-linux form is:
chfn [-f full-name] [-o office] [-p office-phone] [-h home-phone] [-u] [-V] [username|UID]
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
Run man chfn on the target machine before scripting: Linux distributions may ship util-linux or shadow-utils implementations with different options.
Set fields directly
chfn -f "Ada Lovelace"sets your full name.chfn -o "Engineering 4B" -p "+1-555-0100" -h "+1-555-0199"sets your office, office phone, and home phone.
The options are -f for full name, -o for office, -p for office phone, and -h for home phone. Quote values containing spaces so the shell passes each value as one argument.
Use the interactive prompts
- Run
chfnwith no field options. - Enter a value when prompted to change that field.
- Press Enter to leave a value unchanged, or enter
noneto blank it.
Show help or version
For the util-linux implementation, use chfn --help for help and chfn --version for version information. Its current documentation uses -V for the version option; older releases used the deprecated spelling -v. Do not assume another implementation accepts the same options.
Who can change account information?
A regular user can generally change only their own account fields, subject to the host’s /etc/login.defs settings. The superuser can change fields for any account. When specifying another username or UID, you may need root privileges, and the account’s backend must support the operation.
Values cannot contain colons because colons separate fields in /etc/passwd.
How CHFN_RESTRICT affects writable fields
The CHFN_RESTRICT setting in /etc/login.defs controls which fields may be changed. In util-linux documentation, yes permits changes to office, office phone, and home phone; no also permits the full name. The field abbreviations are f (full name), r (office room), w (work phone), and h (home phone). If CHFN_RESTRICT is undefined, the util-linux manual says all finger information is read-only by default.
Rank #4
Why does chfn say the information is read-only?
A read-only message usually means the requested change is blocked by account ownership, insufficient privileges, CHFN_RESTRICT, or the account’s directory-service backend.
- Confirm which account you are changing and whether you have permission to edit it.
- Check
/etc/login.defsforCHFN_RESTRICTand the fields it allows. - Check
man chfnto identify the implementation and its rules on this host. - If the account is managed through LDAP or another directory service, use the supported directory-specific method if the local command cannot update it.
The util-linux manual documents exit status 0 for success and 1 for failure or invalid syntax. A nonzero result indicates the command did not complete successfully; consult its error message and the local manual for the cause.
Best Value
Does chfn work with LDAP or other non-local accounts?
The util-linux implementation can support non-local accounts, including Kerberos and LDAP entries, when it is linked with libuser. Without that support, use the directory’s designated tool, such as ypchfn or lchfn, or another tool supplied by the vendor. Support depends on the installed implementation and system configuration, so the command name alone does not guarantee that a directory account can be edited.
Why chfn behaves differently across Linux systems
Linux distributions may provide either util-linux or shadow-utils versions of chfn. Options and behavior can differ, particularly for non-local accounts and version reporting. For dependable commands, check the target host’s man chfn rather than relying on syntax copied from another distribution.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




