macOS
TMA-MACOS-5.11
Ensure Logging Is Enabled for Sudo
TinggiLevel 1Otomatismacos
Deskripsi
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.
Cara pemeriksaan
Metode audit: Perintah 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- Output yang diharapkan
1
Cara perbaikan
Metode perbaikan: Panduan atau patch infrastruktur
Terminal: sudo /usr/sbin/visudo -f /etc/sudoers.d/<configuration file name>.
Properti
- Sistem operasi
- macos-26
- Tag
- macossystem-access
- Referensi
- CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.11 Ensure Logging Is Enabled for Sudo
Periksa host ini
Jalankan ini pada mesin yang diizinkan untuk Anda audit. Pemindaian bersifat hanya baca.
shell
tmaegis scan --target macos