This brief tutorial shows students and new users how to use the chfn command in Ubuntu to change or update users “finger” information.
Fingers information is stored in the file /etc/passwd, and includes the user’s real name, both work and home phone numbers, work room and others.
If you’re a student or new user looking for a Linux system to start learning on, the easiest place to start is Ubuntu Linux OS…. It’s a great Linux operating system for beginners and folks looking for easier Linux distribution to use.
Ubuntu is an open source Linux operating systems that runs on desktops, laptops, server and other devices…
When using Ubuntu, you will find that Linux isn’t so different than Windows and other operating systems in so many ways, especially when it comes to using the system to get work done.…
Both Ubuntu and Windows systems allow you to be productive, easy to use, reliable and enable you to install and run thousands of programs from gaming to productivity suite software for individuals and businesses.
However, when you’re learning to use and understand Ubuntu Linux, you should also learn how to use the command line to terminal. Most Linux users should be able to do some basic command line tasks.
This tutorial is going to show you how….
When you’re ready to learn how to use the chfn commands, follow the guide below:
About chfn command:
The chfn command is a command line utility that is used to update or modify user’s “finger” information on the system. This info is stored in the /etc/passwd file and including user’s real name, work room, work and home phone numbers, and others.
Syntax is the rule and format of how the chfn command can be used. These syntax options can be reordered, but a straight format must be followed.,.
Below is an example syntax of how to use the chfn command.
chfn [options] [LOGIN]
The command line options are switches or flags that determined how the commands are executed or controlled. they modify the behavior of the commands. they are separated by spaces and followed after the commands.
Below are some options of the chfn command:
|LOGIN||Replace LOGIN with the account login name you want to update or modify|
|-f||If you use the -f or –full-name option to specify the full name of the user|
|-h||Use the -h or –home-phone to specify the home phone of the user|
|-r||Use the -r or –room to specify the user’s room number|
|-R||The -R or –root option to specify the user’s directory to chroot into|
|–help||Display a help message and exit.|
Below are some examples of how to run and use the chfn on Ubuntu Linux.
Simply run the chfn to invoke it.
When you run the chfn command it should prompt for your password and allow you to update your finger info.
Changing the user information for jdoe Enter the new value, or press ENTER for the default Full Name: John Doe Room Number : Work Phone : Home Phone [7390-2938239]:
To gather info of a particular user, simply run the finger command followed by the user account name.
It should display the user richard account info:
Login: jdoe Name: John Doe Directory: /home/jdoe Shell: /bin/bash Office: 301, +8-773-848-4733 Home Phone: 7390-2938239 On since Mon Nov 4 14:27 (CST) on :0 from :0 (messages off) No mail. No Plan.
If you want to use the chfn command to change a user full name or Real Name for user jdoe simply run the command with the option below:
chfn -f "John Doe" jdoe
The command above modifies the user account jdoe with its real name, John Doe
To change the user home and work phone number, simply run the chfn command with the -h and -w option:
chfn -h 1112225555 -w 1113334444 jdoe
To change the user’s room number, simply run the chfn command with the -r option.
chfn -r 500 jdoe
Finally, run the finger command to display the user’s updated info:
Login: jdoe Name: John Doe Directory: /home/jdoe Shell: /bin/bash Office: 500, 111-333-4444 Home Phone: 111-222-5555 On since Mon Nov 4 14:27 (CST) on :0 from :0 (messages off) No mail. No Plan.
Congratulations! You have learned how to use the chfn command on Ubuntu Linux
You may also like the post below: