macOS
TMA-MACOS-5.6
Ensure the "root" Account Is Disabled
高等級 1自動化macos
說明
The root account is a superuser account that has access privileges to perform any actions and read/write to any file on the computer. With some versions of Linux, the system administrator may commonly use the root account to perform administrative functions. Previous versions of the benchmark included a graphical check for the audit and remediation as well as a different Terminal command for the remediation.
檢查方式
稽核方法: Shell 指令
shell
out=$(/usr/bin/dscl . -read /Users/root AuthenticationAuthority 2>&1)
printf '%s\n' "$out" | /usr/bin/grep -q "No such key: AuthenticationAuthority" && echo compliant- 預期輸出
compliant
修補方式
修補方法: 操作指南或基礎設施修補檔
Terminal: sudo /usr/bin/fdesetup remove -user root 2>/dev/null ; sudo /usr/bin/dscl /Local/Default delete /Users/root AuthenticationAuthority.
屬性
- 作業系統
- macos-26
- 標籤
- macossystem-access
- 參考資料
- CIS Apple macOS 26 Tahoe Benchmark v1.1.0 - 5.6 Ensure the "root" Account Is Disabled
檢查此主機
請在您有權稽核的機器上執行此指令。掃描為唯讀操作。
shell
tmaegis scan --target macos