Cheat Sheets

Security - No root aliases

Description

Ensures there are no users with UID 0 besides root.

Tags

  • CCE-26971-2

Check Script: security-no-root-aliases.sh

#!/bin/bash

tmp=$(awk -F: '($3 == "0") {print}' /etc/passwd | grep -v "^root:") if [ "$tmp" != "" ]; then result_failed "There should be no users with UID 0 besides root (but there are: $tmp)" fi