next up previous contents index
Next: Managing Root Access Up: Managing many accounts Previous: Removing a user   Contents   Index

Managing passwords

People forget things, like their password. It's human nature. So any system that is used by humans must have a way of fixing the problem, but it must work in a secure fashion. On a Linux system, like the Debian system you have installed, passwords are kept in an encrypted form that is not easy to break. The only recourse for the ``loss'' of a password is to create a new one for the account, and the only account that can do this is the root account. The program that does this is called passwd. Any user account can use this program to change the password for that account, but only root can change the password on another account.

To change the password for fred enter the following command as root:

passwd fred

Unlike when a user executes passwd, when root executes it, there is no request for the old password. This allows the password to be changed when the old password is not known, but it will only work for the root account. passwd will ask for the new password, and then ask for it again to verify correctness. Once the new account has been given a password by root, the individual who will use that account should use that password to log into the system and then use passwd to change the password to something known to no one else.

In the case of fred, suppose the initial password #123fred is assigned the account. Fred might then use this password to log into the system. Once the shell prompt appears he only needs to enter:

passwd

The passwd program first asks for the old password. Fred then enters:

#123fred passwd does not echo the characters typed at the prompt. This would provide several ways to ``steal'' your password, including just looking over your shoulder as you enter it.

Once passwd verifies that the password is correct, the new password is requested. When it has been entered the new password will be requested again. If you can type the same password twice, it is assumed that you can type it again whenever you need to. This will fail if the two passwords don't match. This keeps the stray character from becoming part of the password. Sometimes when you press the key you wish to press you also press another by mistake. Since these keys are not echoed to the screen, you get no feedback that this has occurred. By asking for the password twice, these mistakes are filtered out. As a result, you may sometimes be asked to try again, even when you thought you got it right. No matter how clumsy you may be, passwd will let you keep trying until you get it right.

Once Fred types his new secret password twice correctly, passwd makes the entries that make that password the new one for this account. The password will not change unless Fred, or someone with root privilege, changes it. This makes the security of root privileges very important on a system with many users just like Fred. Each of these users expect their files to be secure and unaltered by another user account, relying on those with root privileges to not abuse those privileges. This trust between the system administrator (usually the only one with root access to the system) and the users is a relationship in which some are very good and some can be overbearing. However, the best administrator can have a password stolen or otherwise compromised. The person who would do this may not worry about the other people's files, making all precautions useless.


next up previous contents index
Next: Managing Root Access Up: Managing many accounts Previous: Removing a user   Contents   Index
Dale Scheetz