Section 3.8. Setting Your Password: passwd


[Page 49 (continued)]

3.8. Setting Your Password: passwd

After you first log in to a Linux system, it's a good idea to change your initial password if you didn't create your own account (someone set it, so you know at least one other person knows it). A password should generally be at least six letters long, and should not be a word from a dictionary or a proper noun. This is because it's quite easy for someone to set up a computer program that runs through all the words in a standard dictionary and tries them as your password.

To set your password, use the passwd utility (Figure 3-5).

Figure 3-5. Description of the passwd command.

Utility: passwd

passwd allows you to change your password. You are prompted for your old password and then twice for the new one (since what you type isn't shown on the screen, you would not know if you made a typo). The new password may be stored in an encrypted form in the password file "/etc/passwd" or in a "shadow" file (for more security) depending on which was selected during the installation of your Linux system.


Here's an example, with the passwords shown. Note that you wouldn't normally be able to see the passwords, as Linux turns off the keyboard echo when you enter them.

$ passwd Changing password for user ables. Changing password for ables (current) UNIX password: penguin       ... poor choice. New UNIX password: GWK145W             ... better choice. Retype new UNIX password: GWK145W passwd: all authentication tokens updated successfully. $ _ 



[Page 50]

Yes, in many current versions of Linux, the passwd utility really does print the first message twice and refer to the password as a "UNIX" password.

If you forget your password, the only thing to do is to contact your system administrator and ask for a new password. If you can become the administrator, you can set a new password without knowing the old password.




Linux for Programmers and Users
Linux for Programmers and Users
ISBN: 0131857487
EAN: 2147483647
Year: 2007
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net