5.1.9 Ensure at is restricted to authorized users

Information

If at is installed in the system, configure /etc/at.allow to allow specific users to use these services. If /etc/at.allow does not exist, then /etc/at.deny is checked. Any user not specifically defined in those files is allowed to use at. By removing the file, only users in /etc/at.allow are allowed to use at.

Note: Even though a given user is not listed in at.allow at jobs can still be run as that user. The at.allow file only controls administrative access to the at command for scheduling and modifying at jobs.

On many systems, only the system administrator is authorized to schedule at jobs. Using the at.allow file to control who can run at jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.

Solution

Run the following script to remove /etc/at.deny create /etc/at.allow and set the file mode for /etc/at.allow :

#!/usr/bin/env bash

at_fix()
{
if rpm -q at >/dev/null; then
[ -e /etc/at.deny ] && rm -f /etc/at.deny
[ ! -e /etc/at.allow ] && touch /etc/at.allow
chown root:root /etc/at.allow
chmod u-x,go-rwx /etc/at.allow
else
echo "at is not installed on the system"
fi
}
at_fix

OR Run the following command to remove at :

# dnf remove at

See Also

https://workbench.cisecurity.org/files/3796

Item Details

Category: ACCESS CONTROL, MEDIA PROTECTION

References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|MP-2, CSCv7|14.6

Plugin: Unix

Control ID: 46435aae7afe0196d19bacd90c16e1990ad35ba67842b96b0b0b2727d8a093aa