Skip to content

Crontab -e You are not allowed to use this program (crontab)

18 February 2023
SUSE Linux

Learn how to resolve the ‘You are not allowed to use this program (crontab)’ error in Linux. This blog post provides step-by-step instructions to troubleshoot and fix the issue, allowing you to manage your cron jobs effectively

I recently noticed that my user account wasn’t able to use crontab on a newly installed SUSE Linux machine. This was pretty troubling since it meant I couldn’t schedule jobs as a regular user. Running scheduled tasks as root is often unwise given the power of that account. Every time I tried to edit my user crontab using the ‘-e’ flag I got the following message:

[hdsadm ~]$ crontab -e
You (hdsadm) are not allowed to use this program (crontab)
See crontab(1) for more information

It turns out that SUSE Linux 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 like so:

[hdsadm ~]$ su
Password:
[root hds]# echo hdsadm > /etc/cron.allow

This will create the new cron.allow file and add my user account to that file. Once this is done you can utilize crontab as normal.