Depending on how your system is set up, you may be prompted to change your password immediately when you first log in. This is a security feature to ensure that you are the only person who knows your password.
If your system requires you to change your password the
first time you log in, you see a message like
Your password has expired.
The computer then starts the password program.
You see a message like
Setting password for user: loginname,
where loginname is your own login name.
Next, you are prompted for your old password.
Type the password given to you by your system administrator,
then press <Enter>.
The computer responds with a message
Password change is forced for loginname,
where loginname is your login name.
You then see the first screen of the password program.
Follow the instructions on the screen to pick your own password or to have
the computer generate a password for you.
Once you successfully change your password,
the computer finishes logging you in.
If you want to change your password again later, you can use the passwd command to start the password program again. To use the passwd command, type passwd and press <Enter>. You will be prompted for your old password, then you will be given the choice of picking your own password or choosing a machine-generated password. Note that some systems may restrict you from using the passwd program at certain times. This is a security feature that allows the system administrator to control how often users change their passwords.
Q: What if I type my old password incorrectly?
A: If you type your old password incorrectly and press <Enter>, the password program will terminate. If you are changing your password at login, the computer may log you out. In this case, log in again and carefully type your old password when you are prompted.
If you are still logged in after mistyping your old password, you can just restart the password program by typing passwd and pressing <Enter>.
Q: What if I forget my password?
A: If you forget your password completely, all is not lost. Tell your system administrator that you have forgotten your password. He or she will be able to modify your records on the computer so you can log in again and choose a new password.