a
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
awk -F: '($1 !~ /^(root|halt|sync|shutdown)$/ && $7 != "'"$(which nologin)"'" && $7 != "/bin/false" && $7 != "/usr/bin/false") { print $1 " " $6 }' /etc/passwd | while read user dir; do
|
||||
if [ ! -d "$dir" ] ; then
|
||||
echo "The home directory ($dir) of user $user does not exist."
|
||||
else
|
||||
if [ ! -h "$dir/.forward" -a -f "$dir/.forward" ]; then
|
||||
echo ".forward file $dir/.forward exists"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user