Skip to main content

Interpreting cron output [Resolved]

====================================================
====================================================
CHECK_BEGIN: DO_CRON
====================================================
====================================================
[FILE]: CRON.ALLOW
-rw-------. 1 root root 0 Sep  1  2017 /etc/cron.allow
====================================================
====================================================
====================================================
[FILE]: CRON.DENY
-rw------- 1 root root 0 May  5  2018 /etc/cron.deny
====================================================
====================================================
Checking permissions on /var/spool/cron
drwx------. 2 root root 4096 May  5  2018 /var/spool/cron
====================================================

How do I interpret the above output?

  1. The root user can always use cron, regardless of the usernames listed in the access control files?
  2. If the file cron.allow exists, only users listed in it are allowed to use cron, and the cron.deny file is ignored?

Therefore in this case, only the users listed within /etc/cron.allow are allowed access to the cron daemon.


Question Credit: teo93
Question Reference
Asked September 14, 2019
Posted Under: Unix Linux
4 views
1 Answers

If the cron.allow file exists, it lists the users that may use cron. If it does not exist, the cron.deny file is checked.

If the cron.deny file exists, it lists the users that may not use cron. This file is not consulted if the cron.allow file exists.

If all users are denied the use of cron (as in your case, since the cron.allow file exists, and is empty), only root is able to use cron. This is the same that would happen if neither file existed.

The most common configuration is to have an empty cron.deny file and no cron.allow file. This would allow everyone the use of cron.

This also applies to at.deny and at.allow for using at to schedule commands.


credit: terdon
Answered September 14, 2019
Your Answer