Force passwords change on 1st login

How to force users to change their passwords on 1st login

1.) First, lock the account to prevent the user from using the login until the change has been made:

# usermod -L

2.) Change the password expiration date to 0 to ensure the user changes the password during the next login:

# chage -d 0

3.) To unlock the account after the change do the following:

# usermod -U


I am a g33k, Linux blogger, developer, student and Tech Writer for My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.