TMAegis
更多 ros 规则

TMA-ROS1-6.2.1

Ensure password fields are not empty

高级别 1自动化ros

说明

An account with an empty password field means that anybody may log in as that user without providing a password. The audit requires every account in /etc/shadow to have a non-empty password field. Host-level control from the CIS ROS Melodic benchmark (Ubuntu 18.04 robot hosts); run as root.

检查方式

审计方法: Shell 命令

shell
[ -r /etc/shadow ] || exit 1
u=$(awk -F: '($2 == "") {print $1}' /etc/shadow)
[ -z "$u" ] && echo compliant || echo "accounts without password: $(printf '%s ' $u)"
预期输出
compliant

修复方式

修复方法: 操作指南或基础设施补丁

If any accounts in the /etc/shadow file do not have a password, run the following command to lock the account until it can be determined why it does not have a password: # passwd -l <username> Also, check to see if the account is logged in and investigate what it is being used for to determine if it needs to be forced off.

属性

操作系统
任意
标签
rosros1melodicmaintenance
参考
CIS ROS Melodic Benchmark v1.0.0 - 6.2.1 Ensure password fields are not empty

检查本机

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

shell
tmaegis scan --target ros