audit-labs/audit-tools

A collection of scripts, queries, and other goodies you can use in an audit. audit automation compliance evidence scripts

Commit ded42e2f5f

ded42e2f5f0b8758beeb884432fe8d2c5fd35be0

parent: 442d003099

Unsigned

cmc <hello@cleberg.net> · 2025-12-13 17:05 UTC

remove early exit condition

Layout: unified · split

os/linux/ssh_root_login.sh +1 −8
@@ -16,14 +16,7 @@ echo "--- SSH Root Login Audit ---"
1616
1717# Find the PermitRootLogin setting, ignoring commented-out lines
1818permit_root_login=$(grep -E "^[[:space:]]*PermitRootLogin" /etc/ssh/sshd_config)
19
20if [ -z "$permit_root_login" ]; then
21 echo "PermitRootLogin is not explicitly set. Relying on sshd defaults (usually 'prohibit-password')."
22 # In this case, we can assume it's not a simple 'yes', so we can stop.
23 exit 0
24else
25 echo "Found setting: $permit_root_login"
26fi
19echo "Found setting: $permit_root_login"
2720
2821
2922# Check if PermitRootLogin is set to something other than 'no'