TMAegisBeta
更多 macos 规则

macOS

TMA-MACOS15-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-15
标签
macossystem-access
参考
CIS Apple macOS 15.0 Sequoia Benchmark v2.1.0 - 5.6 Ensure the "root" Account Is Disabled

检查本机

请在您有权审计的机器上运行此命令。扫描为只读操作。

shell
tmaegis scan --target macos