Root user or non-root user are not allowed to access Crontab

root crontab, root crontab error, crontab error centos, crontab error linux, crontab not allowed, crontab not allowed, linux crontab not allowed

Root user or non-root user are not allowed to access Crontab
Error Message :

[root@selva ~]# crontab -e
    Permission denied
    You (root) are not allowed to access to (crontab) because of pam configuration.



Solution :

1.  Check the permission of crontab command,

[root@selva ~]# whereis crontab
crontab: /usr/bin/crontab /etc/crontab /usr/share/man/man1p/crontab.1p.gz /usr/share/man/man1/crontab.1.gz /usr/share/man/man5/crontab.5.gz
[root@selva ~]# ll /usr/bin/crontab
-rwsr-sr-x 1 root root 315416 Jul 15  2008 /usr/bin/crontab
[root@selva ~]#


SetUID and SetGID should be set, if not no user can get rights to execute this command.

2. open with vi /etc/pam.d/crond
#
# The PAM configuration file for the cron daemon
#
#
# No PAM authentication called, auth modules not needed
account    required   pam_access.so
to
#account    required   pam_access.so

account    include    password-auth
session    required   pam_loginuid.so
session    include    password-auth
auth       include    password-auth


Problem would be resolved.
root crontab, root crontab error, crontab error centos, crontab error linux, crontab not allowed, crontab not allowed, linux crontab not allowed, Root user or non-root user are not allowed to access Crontab
May 29, 2015

Post a Comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget