Stephen Reese

This might break something the user is doing. You have been warned.

last -i1 baduser | awk '{print $3;exit}' | xargs -p --replace iptables -A INPUT -s {} -j drop if [ "`who | grep $1`" != "" ] ; then sid=`ps -jU $1 | awk '{print $3}' | tail -1`" kill -HUP $sid echo "$1 was logged in. Just booted $1 out." fi ps -u username | grep -v PID | awk '{print $1}' | xargs kill kill $(ps -u username | grep -v PID | awk '{print $1}') 

Comments

comments powered by Disqus