Linux users must change their passwords from time to time to keep their accounts secure.

On Linux, user passwords are set to expire after 99,999 days by default.

Here’s how to force Linux users to change their passwords at the next login.

Lock and asterisks seen over a photo of a server room

Note that you will need admin privileges to view or change the password-related tweaks.

The third field displays the date when the password was last changed.

But before setting a new password, they’ll have to provide the current password.

user password status

After that, the user must change their password.

you could use it to expire the user password immediately or after a certain number of days.

Note thatyou will need admin privilegesto view or change any password-related configs.

expire-password-using-passwd-command-1

To do that, use the-mor–mindaysoption.

However, it is important to use a strong password each time for your accounts.

change password enforced by admin

password status chage

expire password using chage