I have obviously messed something up with my PAM configuration and received the following error message:
[root@server]# crontab -l Permission denied You (root) are not allowed to access to (crontab) because of pam configuration.
To get around this I amended the file:
/etc/security/access.conf
And added a line for the root user as follows:
+ : root : ALL
before the final deny line:
- : ALL : ALL
check that the permissions for /usr/bin/crontab are correct. If the permissions for /usr/bin/crontab are:
-rwxr-xr-x. 1 root root 51784 Aug 23 2016 /usr/bin/crontab
correct them as follows:
chmod u+s /usr/bin/crontab
-rwsr-xr-x. 1 root root 51784 Aug 23 2016 /usr/bin/crontab
This worked for me.