As we know, user’s passwords are stored in '
/etc/shadow' file in encrypted format. To check password expiration of user’s, you need to use '
chage' command. It displays information of password expiration details along with last password change date.
To view any existing user’s aging information such as expiry date and time, use the following command.
# chage -l usernameroot@server.com [~]# chage -l vinzabb
Last password change : Jan 01, 2014
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
To change password aging of any user, use the following command.
#chage -M 60 username
#chage -M 60 -m 7 -W 7 userName
Parameters -M Set maximum number of days
-m Set minimum number of days
-W Set the number of days of warning