The macOS system must configure sudo to log events.
Overview
| Finding ID | Version | Rule ID | IA Controls | Severity |
| V-277059 | APPL-26-000190 | SV-277059r1148629_rule | CCI-000172 | medium |
| Description | ||||
| Sudo must be configured to log privilege escalation. Without logging privilege escalation, it is difficult to identify attempted attacks because no audit trail is available for forensic investigation. | ||||
| STIG | Date | |||
| Apple macOS 26 (Tahoe) Security Technical Implementation Guide | 2026-02-11 | |||
Details
Check Text (C-277059r1148629_chk)
Verify the macOS system is configured to log privilege escalation with the following command:
/usr/bin/sudo /usr/bin/sudo -V | /usr/bin/grep -c "Log when a command is allowed by sudoers"
If the result is not "1", this is a finding.
Fix Text (F-81119r1148628_fix)
Configure the macOS system to log privilege escalation with the following command:
/usr/bin/find /etc/sudoers* -type f -exec sed -i '' '/^Defaults[[:blank:]]*\!log_allowed/s/^/# /' '{}' \;
/bin/echo "Defaults log_allowed" >> /etc/sudoers.d/mscp