Note

Older versions of Linux operating systems limited the length of usernames to 8 characters. The current version of Ubuntu limits usernames to 32 characters. Good passwords should be a minimum of 8 characters long and contain uppercase and lowercase letters, along with numbers. Random passwords for users can be generated using the mkpasswd command. Good passwords are not birthdays, anniversaries, your pet's name, the name of your significant other, or the model of your first car!

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 will modify 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 Password:

Changing the user information for andrew Enter the new value, or press ENTER for the default Full Name: Andrew Hudson Room Number [None]: 17 Work Phone [01225445566]: 01225112233 Home Phone [01225112233]: 01225445566

You are led through a series of prompts to enter new or updated information. Note that the chfn command will 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 andrew /etc/passwd andrew:x:10 00 : 10 00 :Andrew Hudson, 17, 01225112233, 01225445566:\ /home/andrew:/bin/bash

You also can verify the updated user information by using the finger command:

$ finger andrew Login: andrew Directory: /home/andrew Office: 17, +0-122-511-2233 On since Tue May 30 20:54 (BST) On since Tue May 30 20:55 (BST) No mail. No Plan.

Name: Andrew Hudson Shell: /bin/bash Home Phone: +0-122-544-5566 on :0 (messages off) on pts/0 from :1.0

4 PREV

NEXT

Was this article helpful?

0 0

Post a comment