blockauth
This commit is contained in:
parent
ddbe20635a
commit
80a0e9ee73
|
@ -86,8 +86,8 @@ while [ ${blockauth} -eq 0 ] ; do
|
||||||
sleep 60
|
sleep 60
|
||||||
# Read auth.log file and select blocked IPs
|
# Read auth.log file and select blocked IPs
|
||||||
for user in ${valid_users} ; do
|
for user in ${valid_users} ; do
|
||||||
echo "blockauth: allowing acces for ${user}"
|
echo "blockauth: allowing access for ${user}"
|
||||||
echo "blockauth: allowing acces for ${user}" >> ${filelog}
|
echo "blockauth: allowing access for ${user}" >> ${filelog}
|
||||||
sed -i "s/Failed password for ${user} from/blockauth\[allowed\]\: invalid pass for ${user} from/g" /var/log/auth.log
|
sed -i "s/Failed password for ${user} from/blockauth\[allowed\]\: invalid pass for ${user} from/g" /var/log/auth.log
|
||||||
sed -i "s/Failed password for invalid user ${user} from/blockauth\[allowed\]\: invalid pass for ${user} from/g" /var/log/auth.log
|
sed -i "s/Failed password for invalid user ${user} from/blockauth\[allowed\]\: invalid pass for ${user} from/g" /var/log/auth.log
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user