Track email users password changes

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
Hi,

For a client we have 400 users who check their emails regularly, but do not follow the policy of password changes i.e. every 30 days they need to change their password. Now they do not login to webmail, so I cannot use cpanel built in functionality to force them to change passwords.

Is there a way we can track when a users last password was changed ? We can then send them a reminder to change passwords.

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello :)

The date of the last password change is recorded in the shadow file (for email it's stored in /home/$username/etc/$domain/). The following link explains how to find it:

Understanding /etc/shadow file

Thank you.
 

anand

Well-Known Member
Nov 11, 2002
1,432
1
168
India
cPanel Access Level
DataCenter Provider
The date of the last password change is recorded in the shadow file (for email it's stored in /home/$username/etc/$domain). The following link explains how to find it:

Understanding /etc/shadow file
Ok cool, thanks. That's what I was looking for.

A few lines from the article on shadow files
The last 6 fields provides password aging and account lockout features (you need to use chage command to setup password aging).
Is this the same way cpanel forces password change for email users ?

Thanks
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
cPanel uses a combination of it's own scripts and the shadow files for password aging.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
The previous link provided should provide you with enough information about the shadow file so you can develop your own application:

Understanding /etc/shadow file

The module/script that cPanel uses to implement the checking is not open source as far as I know, but you are welcome to make a new post on our Developers forum to get input on how to setup such an application from other users.

Thank you.