Centos: List SSH user last password changed date with cPanel

To secure your server with cPanel, you might want to consider to request your cPanel user to change your password quarterly.

To get this done, you may consider to use the command name chage.

[email protected] [~]# chage -l username
Last password change                                    : Jul 28, 2012
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 list all user Last password change date, you may do with the following command,

for i in `ls -l /var/cpanel/users | grep -vE '(\.|system)'| awk '{print $9}'`;do echo $i&&chage -l $i|grep Last;done;