How to force users change password on first login Linux

How to force users change their passwords upon rst login in Linux? How to make sure user changes password at next login time in Linux?

You can force a user to change their password upon rst time login to Linux server. You can even force existing users to change their passwords on next login. This is done using chage command in Linux. The chage command will change the user password expiry information.

The below chage command will make user password expired. Hence, this will force user to provide a new password. Here we are forcing oracle user to change password on next login

# chage -d 0 oracle

The option -d 0 will mark the password expired and hence, user will be forced to change password.

Leave a Reply

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