• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

chfn: command not found

by Deepika

chfn is a command-line utility in Linux that is used to change the user information associated with a specific user account. This information includes the user’s full name, office location, office phone number, and other details that are stored in the system password file.

To use chfn, you will need to have root privileges or be the owner of the user account that you want to modify. You can then use the following command syntax to change the user information:

# chfn [options] username

This command will prompt you to enter the new user information, which you can enter by typing or pasting the information at the prompt. When you are finished, you can press Enter to save the changes.

If you encounter the below error while running the command chfn:

chfn: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install passwd
Ubuntu apt-get install passwd
Alpine apk add util-linux
Arch Linux pacman -S util-linux
Kali Linux apt-get install passwd
CentOS yum install util-linux-ng
Fedora dnf install util-linux-user
OS X brew install util-linux
Raspbian apt-get install passwd

chfn includes several options that allow you to customize the way it modifies the user information. For example, you can use the -f option to specify the full name, the -o option to specify the office location, and the -p option to specify the office phone number.

For example, to change the full name of the user john to John Smith, you can use the following command:

# chfn -f "John Smith" john

chfn Command Examples

1. Update a user’s “Name” field in the output of `finger`:

# chfn -f new_display_name username

2. Update a user’s “Office Room Number” field for the output of `finger`:

# chfn -o new_office_room_number username

3. Update a user’s “Office Phone Number” field for the output of `finger`:

# chfn -p new_office_telephone_number username

4. Update a user’s “Home Phone Number” field for the output of `finger`:

# chfn -h new_home_telephone_number username

Filed Under: Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL : How to Change the login shell of the user
  2. Oracle OS watcher (OSWatcher) – Understanding oswmpstat
  3. modprobe Command Examples in Linux
  4. ‘ulimit: max user processes: cannot modify limit:operation not permitted’ Shown When Login
  5. login Command Examples in Linux
  6. How to Find Filesystem Inode Utilization in Linux
  7. dbus-daemon Command Examples in Linux
  8. How To Auto Mount a FileSystem Using Systemd
  9. halt Command Examples in Linux
  10. Log watching using tail or less

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright