Linux Foundation Certified System Administrator Exam: Cron Permissions in Linux

Cron Permissions in Linux

Question

In case neither cron.allow nor cron.deny exist in /etc/, which of the following is true?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A

If neither cron.allow nor cron.deny files exist in the /etc/ directory, then the default behavior of the cron daemon will apply. In this case, the answer is (B) - without additional configuration, all users may have user-specific crontabs.

The cron daemon reads the system-wide /etc/crontab file and also checks for per-user crontab files in the /var/spool/cron/ directory. If the cron.allow file exists, the cron daemon only allows users listed in that file to create their own crontab files. If the cron.deny file exists, users listed in that file will be prevented from creating crontab files. If neither file exists, all users are allowed to create their own crontab files.

Therefore, if neither file exists, the default behavior is that all users may have user-specific crontabs without additional configuration.

Option (A) is incorrect because users are still allowed to have user-specific crontabs. Option (C) is incorrect because the cron daemon will start without any issue, and there will be no error reported in the system's logfile regarding the missing cron.allow or cron.deny files. Option (D) is incorrect because the system administrator does not need to approve user-specific crontabs if neither cron.allow nor cron.deny files exist.