Which of the following is true?

In case neither cron.allow nor cron.deny exist in /etc/, which of the following is true?
A. Without additional configuration, no users may have user specific crontabs.
B. Without additional configuration, all users may have user specific crontabs.
C. The cron daemon will refuse to start and report missing files in the system’s logfile.
D. When a user creates a user specific crontab the system administrator must approve it explicitly.

Download Printable PDF. VALID exam to help you PASS.

8 thoughts on “Which of the following is true?

  1. 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.

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

    https://www.thegeekdiary.com/unix-linux-how-crontab-validates-the-access-based-on-the-cron-allow-and-cron-deny-files/

    Hope the extra info is helpfull for the next person 😉

  2. if neither file exists then only root can create crontabs, making the answer A.
    There is no way to prevent root from using cron, so these files will only affect user access.

    The only way for a user to have a user-specific crontab is if root creates it for them with: crontab -u {user} -e
    or you can grant the user the ability to do it themselves by listing their username in the /etc/cron.allow file.

    This is how I see it, thinking from root’s perspective

  3. centos has /etc/cron.deny empty file already created, so as long as it’s empty, any user can create cron jobs, if you delete this file, non-root users will not be able to do anything with cron..

    1. so answer is A for centos, although if /etc/cron.deny is missing, root still can use cron! silly question indeed..

  4. Thank you so much for the comments. I had doubts.
    I thought the correct one was answer B, but I was surprised to see that question A is the correct one ..
    Marius’s answer has helped to understand why it is the right answer.
    Anyway it is a somewhat tricky question

  5. Answer A is wrong. This would by the behaviour of atd and is not the one of crond.
    Due Answer B is right.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.