Ubuntu - Cron - Limit Crontab Access to Specified Users

The cron.allow file will be needed.

Run the below command to check whether it exists in your system or not.

sudo ls /etc/cron.d/ | grep ".allow"

If this file exists, you can edit it as root and specify who can access crontab files in your system. Else, login as superuser and create this file yourself.

sudo vi /etc/cron.d/cron.allow

Enter the usernames for whom you want to enable crontab access.

Don’t forget to list root at the top or you may lock yourself out from your own crontab.