Watch all our Tutorials and Training Videos for Free on our Youtube Channel, Get Online Web Tools for Free on swebtools.com

Search Suggest

Root user or Non root user 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


If you have ever faced error as below - You are not allowed to access to crontab? Due to a security concern, We may have this issue like Non root user not allowed to access crontab.

This post will help to resolve this error.

If you are interested in learning, Request you to go through the below recommended tutorial.

DevOps Full Course Tutorial for Beginners - DevOps Free Training Online
Docker Full Course Tutorial for Beginners - Docker Free Training Online
Kubernetes Full Course Tutorial for Beginners - Kubernetes Free Training Online
Ansible Full Course Tutorial for Beginners - Ansible Free Training Online
Openstack Full Course Tutorial for Beginners - Openstack Free Training Online

Error Message :

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

How to Fix? Root user or Non root user not allowed to access Crontab


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 /etc/pam.d/crond configuration file and comment the below value.

#account    required   pam_access.so

#
# The PAM configuration file for the cron daemon
#
#
# No PAM authentication called, auth modules not needed
account    include    password-auth

session    required   pam_loginuid.so

session    include    password-auth

auth       include    password-auth

Now the Problem would be resolved.
Related Content on Linux might be useful to you to improve your Linux Skills.



Keep practicing and have fun. Leave your comments if any.

Support Us: Share with your friends and groups.

Stay connected with us on social networking sites, Thank you.