Fix: (oracle) are not allowed to use this program (crontab)

Symptoms:
[oracle@oracle01 nmon]$ crontab -l
You (oracle) are not allowed to use this program (crontab)
See crontab(1) for more information

Cause:
it turns out that Mandriva doesn’t create default rules for crontab’s use by users. Instead, on a new install crontab is restricted to the root account. There are two files that control usage of crontab, both in /etc. These are:
/etc/cron.allow
/etc/cron.deny
The system checks cron.allow first, and if it doesn’t exist checks cron.deny. If neither file exists then the system won’t allow anyone but root to utilize cron.
In order to allow normal users to use crontab you have to add their user account to the cron.allow file:

Solution:
[root@oracle01 etc]# ls -lrt /etc/ |grep -i cron
drwx——. 2 root root 4096 Dec 27 2013 cron.weekly
-rw——-. 1 root root 451 Dec 27 2013 crontab
drwx——. 2 root root 4096 Dec 27 2013 cron.monthly
drwx——. 2 root root 4096 Dec 27 2013 cron.hourly
-rw——-. 1 root root 541 Feb 13 2019 anacrontab
drwx——. 2 root root 4096 Nov 2 13:02 cron.d
drwx——. 2 root root 4096 Nov 2 13:02 cron.daily
-rw——-. 1 root root 0 Nov 2 13:07 cron.allow
[root@oracle01 etc]# more cron.allow
[root@oracle01 etc]# echo oracle > /etc/cron.allow
[root@oracle01 etc]# more cron.allow
oracle
[oracle@vmapmtcdhemeappegwgg ~]$ crontab -l
##NMON
0 */2 * * * /home/oracle/nmon/nmon.sh

 

Leave a Reply

Your email address will not be published. Required fields are marked *