Welcome to WebmasterWorld Guest from 54.196.231.129

Forum Moderators: bakedjake

Message Too Old, No Replies

Ending a user session

     
3:28 pm on Jan 30, 2009 (gmt 0)

New User

5+ Year Member

joined:Jan 5, 2009
posts: 34
votes: 0


How do I end a specific user's session that is staying open. I've tried doing it through the database with no luck. I use putty to access the ssh (don't know if that makes a difference). Thank you.
3:54 pm on Jan 30, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 31, 2003
posts:1316
votes: 0


Do you mean disconnect their ssh session? You need to find what tty they're on (using the w command), then find the process id of their shell like this: ps ax ¦ grep pts/1

Then as root, kill -9 the process id.

4:41 am on Mar 24, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 20, 2004
posts:875
votes: 2


kill -9 the process id.

Be nice and try kill -1 before nuking it, please.

11:18 am on Mar 24, 2009 (gmt 0)

Senior Member from LK 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Nov 16, 2005
posts:2417
votes: 17


killall -u username

or

pkill -u username

pkill lets you specify the signal the same way as kill (-9 for example) whereas killall uses a -s or --signal switch.