UNIX / Linux : How crontab validates the access based on the cron.allow and cron.deny files

To allow or deny access to specific users, crontab uses the files /etc/cron.allow and /etc/cron.deny. Based on the existence of /etc/cron.allow and /etc/cron.deny files, crontab decides whom to give access to cron in following order.

  1. If cron.allow exists – only the users listed in the file cron.allow will get an access to crontab.
  2. If cron.allow does not exist – all users except the users listed into cron.deny can use crontab
  3. If neither of the file exists – only the root can use crontab
  4. If a user is listed in both cron.allow and cron.deny – that user can use crontab.
Related Post