TMA-ROS1-6.2.3
Ensure root is the only UID 0 account
HighLevel 1Automatedros
Description
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.
How it is checked
Audit method: Shell command
shell
u=$(awk -F: '($3 == 0) {print $1}' /etc/passwd) || exit 1
[ "$u" = root ] && echo compliant || echo "UID 0 accounts: $(printf '%s ' $u)"- Expected output
compliant
How it is fixed
Fix method: Guidance or infrastructure patch
Remove any users other than root with UID 0 or assign them a new UID if appropriate.
Properties
- Operating systems
- Any
- Tags
- rosros1melodicmaintenance
- Reference
- CIS ROS Melodic Benchmark v1.0.0 - 6.2.3 Ensure root is the only UID 0 account
Check this host
Run this on a machine you are allowed to audit. The scan is read-only.
shell
tmaegis scan --target ros