In Linux the /etc/cron.allow and /etc/cron.deny files are used to set crontab restrictions.
In particular, they are used to allow or disallow the scheduling of cron jobs for different users. If
/etc/cron.allow exists, only non-root users listed within it can schedule cron jobs using the
crontab command. If /etc/cron.allow does not exist but /etc/cron.deny exists, only nonroot
users listed within this file cannot schedule cron jobs using the crontab command (in this
case an empty /etc/cron.deny means that each user is allowed to schedule cron jobs with
crontab). If neither of these files exist, the user’s access to cron job scheduling depends on the
distribution used.
If both the cron.allow and the cron.deny files do not exist, the default on current Ubuntu and other Debian-based systems is to allow all users to use the crontab command.
If the cron.allow file exists, a user must be listed in it to be allowed to use crontab. If the cron.allow file does not exist but the cron.deny file does exist, then a user must not be listed in the cron.deny file in order to use crontab. If neither of these files exist, then only the super user is allowed to use crontab.
A. Without additional configuration, all users may create user-specific crontabs.
In Unix-based operating systems, the cron daemon is used to schedule and run commands periodically. The cron daemon reads the system crontab file /etc/crontab and user-specific crontab files located in the /var/spool/cron directory. By default, all users can create and modify their own user-specific crontab files without additional configuration.
The cron.allow and cron.deny files are optional and can be used to control which users are allowed or denied permission to create or modify their own user-specific crontab files.
Therefore, option A is correct. If neither cron.allow nor cron.deny exist in /etc/, all users can create their own user-specific crontab files without additional configuration. Options B, C, D, and E are incorrect because they do not describe the behavior of the cron daemon in the given scenario.
It is B: I checked the docu
According to the Cron documentation, if neither cron.allow nor cron.deny exist in /etc/, the correct answer is B: "Without additional configuration, only root may create user specific crontabs.
As access to cron without the existence of "cron.allow" or "cron.deny" files differs depending on which distro you're using, the only thing we know for sure is that root will be able to access it if neither file is present.
"If neither of these files exist, the user’s access to cron job scheduling depends on the
distribution used."
source: LPIC-1 (102) (Version 5.0), page 206
Answer B
...because: What is always true is that root may always create user crontabs in the way of run "crontab -e" with sudo (root privilegies)
Others are wrong because:
A. "all users may create user specific crontabs" is true only in certain distro - like Ubuntu. Indeed here is not permitted - Oracle Solaris? - https://docs.oracle.com/cd/E19253-01/817-0403/sysrescron-23/index.html
E. deals with /etc/crond.conf that doesn't exist (in Ubuntu for sure) and doesn't appear in any crontab MAN
C. and D. are frankly pure crap
"If neither cron.allow nor cron.deny exists, superuser privileges are required to run the crontab command."
https://docs.oracle.com/cd/E19253-01/817-0403/sysrescron-23/index.html
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
yigido
Highly Voted 4 years, 3 months agoJorro99404
4 years, 2 months agoThi_86
Highly Voted 4 years, 3 months agoRV025
Most Recent 1 month agoSeifoto
5 months, 2 weeks agoRaafiik
9 months, 3 weeks agofdat
1 year, 7 months agojurgen1
1 year, 7 months agoMchoeti
1 year, 7 months agokaramazov
1 year, 9 months agoAdam_H
1 year, 9 months agoTT924
1 year, 11 months agoil_biondo
1 year, 12 months agodragonsoul
1 year, 12 months agoMaxfr
2 years agopstree
2 years, 3 months agoTITI
2 years, 4 months agoRoyRoyRoyRoy
2 years, 4 months ago