passwd command changes passwords for user accounts. A normal user may only change the password for his/her own account, while the super user may change the password for any account. passwd also changes account information, such as the full name of the user, the userâ€™s login shell, or his/her password expiry date and interval.
If you wish to immediately expire an account’s password, you can pass the -e option to passwd command. This in effect can force a user to change his/her password at the user’s next login.
Let us assume user name is raj, then login as root user and type following command:
# passwd -e raj
Next time when raj tries to login
You are required to change your password immediately (root enforced)
Changing password for raj
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
Linux debian 2.6.13 #2 Sun Oct 2 20:07:57 IST 2005 i686 GNU/Linux
Last login: Thu Oct 6 01:24:15 2005