My cron jobs have stopped working on my CentOS 7 server. The server is running WHM/cPanel.
It seems like it is an issue with PAM service because in /var/log/secure I can see the following errors when the cron jobs try to run:
Jun 24 10:45:01 server1 crond[22400]: pam_access(crond:account): auth could not identify password for [root]
Jun 24 10:45:01 server1 crond[22404]: pam_access(crond:account): auth could not identify password for [admin]
Jun 24 10:45:01 server1 crond[22400]: pam_localuser(crond:account): auth could not identify password for [root]
Jun 24 10:45:01 server1 crond[22402]: pam_access(crond:account): auth could not identify password for [root]
Jun 24 10:45:01 server1 crond[22405]: pam_access(crond:account): auth could not identify password for [admin]
Jun 24 10:45:01 server1 crond[22400]: pam_localuser(crond:account): auth could not identify password for [root]
Similarly /var/log/cron.log is showing that PAM is failing:
Jun 24 12:40:01 server1 crond[26129]: (admin) PAM ERROR (Authentication information cannot be recovered)
Jun 24 12:40:01 server1 crond[26129]: (admin) FAILED to authorize user with PAM (Authentication information cannot be recovered)
Jun 24 12:40:01 server1 crond[26130]: (admin) PAM ERROR (Authentication information cannot be recovered)
Jun 24 12:40:01 server1 crond[26130]: (admin) FAILED to authorize user with PAM (Authentication information cannot be recovered)
Jun 24 12:40:01 server1 crond[26125]: (root) PAM ERROR (Authentication information cannot be recovered)
Jun 24 12:40:01 server1 crond[26125]: (root) FAILED to authorize user with PAM (Authentication information cannot be recovered)
Jun 24 12:40:01 server1 crond[26127]: (root) PAM ERROR (Authentication information cannot be recovered)
Jun 24 12:40:01 server1 crond[26127]: (root) FAILED to authorize user with PAM (Authentication information cannot be recovered)
Jun 24 12:40:01 server1 crond[26131]: (admin) PAM ERROR (Authentication information cannot be recovered)
Jun 24 12:40:01 server1 crond[26131]: (admin) FAILED to authorize user with PAM (Authentication information cannot be recovered)
I've tried the following with no success:
- Rebooting the server
- Restarting the cron service
- Editing /etc/security/access.conf to ensure that root is allowed access to the cron
- cron.allow is non-existent and cron.deny is empty so that shouldn't be the problem
- Disabling SELinux and rebooting
- Changing root password to ensure it's not an expiry issue
- Checked /etc/passwd and /etc/shadow for passwords of both root and admin user
- Removed all cron jobs except a simple one to write to a text file every minute. This cron job also did not work so it's not related to the jobs in the cron.
Please help as I'm not sure what else to do to fix this problem. It's worth noting that this issue started on June 21 and no changes were made to the server when it began occurring.
root
, andadmin
in both/etc/passwd
, and/etc/shadow
? In/etc/passwd
, there should be anx
for the password field, and in/etc/shadow
there should be a big long hash./etc/pam.d/
was recently changed?