Files
atap/ATAPAuditor/Helpers/ShellScripts/Debian_11/CIS-Debian-6.2.9.sh
T
2026-05-11 09:15:08 +02:00

10 lines
382 B
Bash

#!/bin/bash
awk -F: '($1!~/(root|halt|sync|shutdown)/ && $7!~/^(\/usr)?\/sbin\/nologin(\/)?$/ && $7!~/(\/usr)?\/bin\/false(\/)?$/) { print $1 " " $6 }' /etc/passwd | while read -r user dir; do
if [ -d "$dir" ]; then
file="$dir/.forward"
if [ ! -h "$file" ] && [ -f "$file" ]; then
echo "User: \"$user\" file: \"$file\" exists"
fi
fi
done