It is a good policy to have password aging so that the users are forced to change their passwords at a certain interval. This, in turn, helps to keep the security of the system as well.
We can use
chage to configure the password to expire the first time the user logs in to the system.
Note: This process will not work if the user logs in to the system using SSH.
This method of using
chage will ensure that the user is forced to change the password right away.
If we use only
chage <username>, it will display the current password aging value for the specified user and will allow them to be changed interactively.
The following steps need to be performed to accomplish password aging: