-
Notifications
You must be signed in to change notification settings - Fork 706
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ubuntu 24.04 2.4.2.1 Ensure at is restricted to authorized users
- Loading branch information
1 parent
e8d46c2
commit 3b16f59
Showing
5 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
linux_os/guide/services/cron_and_at/restrict_at_cron_users/file_at_allow_exists/rule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
documentation_complete: true | ||
|
||
|
||
title: Ensure that /etc/at.allow exists | ||
|
||
description: |- | ||
The file <tt>/etc/at.allow</tt> should exist and should be used instead | ||
of <tt>/etc/at.deny</tt>. | ||
rationale: |- | ||
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. | ||
severity: medium | ||
|
||
ocil_clause: 'the file /etc/at.allow does not exist' | ||
|
||
ocil: |- | ||
The file <tt>/etc/at.allow</tt> should exist. | ||
This can be checked by running the following command: | ||
<pre> | ||
stat /etc/at.allow | ||
</pre> | ||
and the output should list the file. | ||
template: | ||
name: file_existence | ||
vars: | ||
filepath: /etc/at.allow | ||
exists: true | ||
fileuid: "0" | ||
filemode: "0640" |
2 changes: 2 additions & 0 deletions
2
.../guide/services/cron_and_at/restrict_at_cron_users/file_at_allow_exists/tests/dne.fail.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
rm -rf /etc/at.allow |
2 changes: 2 additions & 0 deletions
2
...ide/services/cron_and_at/restrict_at_cron_users/file_at_allow_exists/tests/exists.pass.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
touch /etc/at.allow |