LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Disconnecting a single user now!!! (https://www.linuxquestions.org/questions/linux-security-4/disconnecting-a-single-user-now-296654/)

rsharpypoo 03-02-2005 06:54 AM

Disconnecting a single user now!!!
 
If I have 150 users logged on and I want to kick only 1 user off immediately, how can I do this and not disrupt the rest of the world.
Thanks

theYinYeti 03-02-2005 07:08 AM

Maybe something like:
ps -u thisUserLoginName | grep -v 'PID' | awk '{print $1}' | xargs kill

I'm on cygwin right now. I can't test.

Yves.

zhjim 03-02-2005 07:09 AM

Easiest way to do this is to kill all programs run by the user. You could also just kill the programm the user uses to connect to your box.
Or if you got his ip adress. Deny connections from this ip. Either using iptables, or hosts.deny/allow.

You could check out some security-papers and read the section about "What to do during a compromise" or similar headline.

Hope this helps
--zhjim--


All times are GMT -5. The time now is 04:25 AM.