How to fix a crontab access issue with a pam configuration error message? [closed]

I attempted to access my crontab as the non-root user "coins" when I encountered a permissions issue as shown in the following error message mentioning the pam configuration:

[coins@COINS-TEST ~]$ crontab -l

Authentication service cannot retrieve authentication info You (coins) are not allowed to access to (crontab) because of pam configuration.

What's the most common fix for this crontab access issue?


Solution 1:

You need to enable the user to use cron in the login access control table file /etc/security/access.conf
Use the following entry which will allow the coins user to run cron jobs:

# Allow the coins user to run cron jobs
+: coins : cron crond :0

Ensure it is above the last entry:

# Deny all other users access by any means.
-: ALL : ALL

As this entry denies (-) access from all sources to all other users not previously mentioned in the file.

Also Note
Expired accounts get the same error message as accounts not allowed.
Please check the account that's denied to see if it is expired:

chage -l accountname

Solution 2:

You might check what's in here:

/etc/cron.allow

and also see if selinux is running and causing the problem. Poking around /var/log/messages or syslog is recommended.