Hi,
I have a script to unban a user from denyhosts, but every time I run it it 
either unbans everyone, or unbans many of the people, even though I told it to 
only unban one ip address.
If anyone could write a revised script, that would be great.
I know people have told me to use the -I for a backup file, but that doesn't 
seem to do anything (or I don't know how to use that command line switch, hence 
the request to write a revised script).
Script is below:
#!/bin/bash 
# Denyhosts is stopped elsewhere before running this script.
#

cd /usr/share/denyhosts/data 
sed "/.*$1.*/d" <users-hosts >users-hosts
sed "/$1.*/d" <hosts >hosts
sed "/$1.*/d" <hosts-valid >hosts-valid 
sed "/$1.*/d" <hosts-root >hosts-root
sed "/$1.*/d" <hosts-restricted >hosts-restricted
cd /etc
sed "/^sshd: $1/d" <hosts.deny >hosts.deny 
# 
# Denyhosts is started elsewhere after running this script. 
Thanks,

-Michael.
http://mtgames.org/
http://ezmoneywebsite.org/
------------------------------------------------------------------------------
_______________________________________________
Denyhosts-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/denyhosts-user

Reply via email to