Force a user to change their Linux password

I had to setup a new user on a Linux server and I wanted to give them a temporary password and make them change it after their first login. You can use the chage command to control when a password expires (and requires a change). Create a new user and give them a default password. Then set that user's password to expire immediately.

chage -d0 username

This will set the password for username to expire in 0 days.



Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.146.34.191
To prevent spam please submit by clicking the kitten: