macOS
TMA-MACOS-5.11
Ensure Logging Is Enabled for Sudo
ÉlevéeNiveau 1Automatiséemacos
Description
In order to properly monitor the use of the sudo command, logs events for any use of sudo should be captured in the unified log.
Méthode de vérification
Méthode d'audit: Commande shell
shell
out=$(/usr/bin/sudo -V 2>/dev/null) || exit 1
printf '%s\n' "$out" | /usr/bin/grep -c "Log when a command is allowed by sudoers" || true- Sortie attendue
1
Méthode de correction
Méthode de correction: Recommandation ou correctif d'infrastructure
Terminal: sudo /usr/sbin/visudo -f /etc/sudoers.d/<configuration file name>.
Propriétés
- Systèmes d'exploitation
- macos-26
- Étiquettes
- macossystem-access
- Référence
- CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.11 Ensure Logging Is Enabled for Sudo
Vérifier cet hôte
Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.
shell
tmaegis scan --target macos