Wednesday, May 25, 2016

Linux Password Expiration and Aging Using chage



Check if the user expiry date is reached or not by using chage command

[root@srinivaslinux1 ~]# chage -l webcat
Last password change : May 25, 2016
Password expires         : May 20, 2017
Password inactive          : never
Account expires : May 23, 2016
Minimum number of days between password change : 0
Maximum number of days between password change : 360
Number of days of warning before password expires : 7

If you see that the account expires use usermod or chage command to extend the user expiry time.

[root@srinivaslinux ~]# usermod -e 2020-05-10 webcat

Check if the user expiry date is changed or not 

[root@srinivaslinux ~]# chage -l webcat
Last password change : May 25, 2016
Password expires         : May 20, 2017
Password inactive          : never
Account expires : May 10, 2020
Minimum number of days between password change : 0
Maximum number of days between password change : 360
Number of days of warning before password expires : 7



No comments:

Post a Comment