I attempted to lớn 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 lớn access to lớn (crontab) because of pam configuration.
What's the most common fix for this crontab access issue?
MikeyB
39.9k10 gold badges110 silver badges192 bronze badges
asked Aug 13, năm trước at 14:15
RajRaj
1711 gold badge1 silver badge3 bronze badges
2
You need to lớn enable the user to lớn use cron in the login access control table tệp tin /etc/security/access.conf
Use the following entry which will allow the coins user to lớn lập cập cron jobs:
# Allow the coins user to lớn lập cập 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 lớn all other users not previously mentioned in the tệp tin.
Also Note
Expired accounts get the same error message as accounts not allowed.
Please kiểm tra the trương mục that's denied to lớn see if it is expired:
chage -l accountname
answered Aug 13, năm trước at 15:39
geedoubleyageedoubleya
7324 silver badges10 bronze badges
4
You might kiểm tra 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.
answered Aug 13, năm trước at 14:33
kokotokokoto
1563 bronze badges
If you have sudo access, you can work around this with:
$ sudo crontab -u `whoami` -l
For a permanent solution with above, create an alias in your .bashrc
:
alias crontab='sudo crontab -u `whoami`'
After adding the alias, open new terminal and try running the crontab command again:
$ crontab -l
answered Sep 23, năm trước at 5:03
1
You must log in to lớn answer this question.
Not the answer you're looking for? Browse other questions tagged
.
Not the answer you're looking for? Browse other questions tagged
.