1) Set the password expiry date for username (*-M will update both “Password expires” and “Maximum number of days between password change”):
chage -M number-of-days username
*If the password expiry date is reached and user doesn’t change his password, the system will force him to change the password before the login is executed.
2) Change the Account Expiry Date:
chage -E “2009-11-31” username
3) Force the user account to lock after 10 days:
chage -I 10 username
4) Turn off the password expiration for an user account, set the following:
-m 0 will set the minimum number of days between password change to 0
-M 99999 will set the maximum number of days between password change to 99999
-I -1 (number minus one) will set the “Password inactive” to never
-E -1 (number minus one) will set “Account expires” to never.
chage -m 0 -M 99999 -I -1 -E -1 username