Files
atap/ATAPAuditor/Helpers/ShellScripts/RHEL9_CIS2.0.0/5.3.3.3.2.sh
T
2026-05-11 09:15:08 +02:00

16 lines
287 B
Bash

#!/usr/bin/env bash
pw_file="/etc/security/pwhistory.conf"
value="enfore_for_root"
regex_pattern="^\s*#*\s*${value}\s*"
if grep -Eq "^\s*${value}\s*$" "$pw_file"; then
echo "$value is correctly set."
exit 0
else
echo "ERROR: $value is either missing or commented out."
exit 1
fi