TMA-ROS1-6.2.3
Ensure root is the only UID 0 account
高级别 1自动化ros
说明
Any account with UID 0 has superuser privileges on the system. The audit requires root to be the only UID 0 account. Host-level control from the CIS ROS Melodic benchmark (Ubuntu 18.04 robot hosts); run as root.
检查方式
审计方法: Shell 命令
shell
u=$(awk -F: '($3 == 0) {print $1}' /etc/passwd) || exit 1
[ "$u" = root ] && echo compliant || echo "UID 0 accounts: $(printf '%s ' $u)"- 预期输出
compliant
修复方式
修复方法: 操作指南或基础设施补丁
Remove any users other than root with UID 0 or assign them a new UID if appropriate.
属性
- 操作系统
- 任意
- 标签
- rosros1melodicmaintenance
- 参考
- CIS ROS Melodic Benchmark v1.0.0 - 6.2.3 Ensure root is the only UID 0 account
检查本机
请在您有权审计的机器上运行此命令。扫描为只读操作。
shell
tmaegis scan --target ros