Changing Your User Information
Linux users are assigned a name, known as a username, by the root operator. One method of assigning usernames is to use one’s first initial and last name in lowercase; for example, Bernice Hudson would have a username of bhudson. Each user must also have a password, which is used with the username either at a graphical or text-based login.
You cannot change your username, but you can change your user information, such as address, phone, and so on. You make these changes using the chfn or change finger information command. This command modifies the contents of your entry in the system password file /etc/passwd, which is used by the finger command to display information about a system’s user. For example, type chfn at the command line and press Enter:
$ chfn Changing finger information for bhudson. Password: Name []: Bernice Hudson Office []: Suite 56 N. Centennial Blvd. Office Phone []: 919 555-1212 Home Phone []: 919 555-1213 Finger information changed.
You are led through a series of prompts to enter new or updated information. Note that the chfn command does not let you use any commas when entering information. You can verify this information in a couple ways, for example, by looking at the contents of /etc/passwd:
$ grep bhdudson /etc/passwd bhudson:x:501:501:Bernice Hudson,Suite 56 N. Centennial Blvd.,919 555-1212,919 555-1213:/home/bhudson:/bin/bash
You also can verify the updated user information by using the finger command:
$ finger bhudson Login: bhudson Name: Bernice Hudson Directory: /home/bhudson Shell: /bin/bash Office: Suite 56 N. Centennial Blvd. Office Phone: 919 555-1212 Home Phone: 919 555-1213 Never logged in. No mail. No Plan.