How can a specific user be prevented from scheduling tasks with at?
How can a specific user be prevented from scheduling tasks with at?
A specific user can be prevented from scheduling tasks with 'at' by adding the specific user's name to the /etc/at.deny file. This file specifies users who are not allowed to schedule 'at' jobs. If /etc/at.allow exists, only users listed there can schedule jobs, otherwise /etc/at.deny is used to deny specific users. Thus, adding the user to /etc/at.deny prevents them from scheduling tasks.
Configure Access to Job Scheduling Authorization for ordinary users to schedule at jobs is determined by the /etc/at.allow and /etc/at.deny files. If /etc/at.allow exists, only non-root users listed within it can schedule at jobs. If /etc/at.allow does not exist but /etc/at.deny exists, only non-root users listed within it cannot schedule at jobs (in this case an empty /etc/at.deny file means that each user is allowed to schedule at jobs). If neither of these files exist, the user’s access to at job scheduling depends on the distribution used. https://learning.lpi.org/en/learning-materials/102-500/107/107.2/107.2_02/
D is the correct answer
In summary, The logic for at usage is: If /etc/at.allow exists, only non-root users listed within it can schedule jobs. If /etc/at.deny exists, only non-root users listed within it cannot schedule jobs. If none of them exists: permission for non-root scheduling is distro dependent.