a
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user