Click to See Complete Forum and Search --> : kicking users


Harvey
10-25-2000, 10:27 AM
is there a way to just kick people offline when you see that they are logged into your system? assuming you have root access of course.

Just because sometimes I forget to log off at home and I run around campus and access my computer and I'm like logged in twice. nothing big. but you know. just wondering if it's possible

------------------
Help me I'm Harvey!

ille_pugil42
10-25-2000, 11:07 AM
I don't know if this is the easiest way to do it, but here goes. run 'ps -x' and this will list what's running. Look for bash (or whatever shell). Then you can kill (or my personal fav 'skill -7') that task - POOF! they're logged out. http://www.linuxnewbie.org/ubb/smile.gif

quakeroatz
10-25-2000, 12:20 PM
To kick users off your system do the following:

type

ps aux | grep username

youll end up with a line like
username 2502 1.6 0.3 2312 1332 pts/0 S 12:12 0:00 -bash

see the -bash? thats the users present shell. See the 2502? Thats the process id (PID) of the users shell... this is what you need to kill to boot the user... so repeat after me... type

kill -s 9 PID

Bye bye user!

Hope this helps, as I am a savage newbie in a strange land http://www.linuxnewbie.org/ubb/wink.gif

edustind
05-20-2001, 02:48 PM
Wierd problem

I have pts users logged in - but when doing a ps x - there are no bash shells listed for them.

Some users just aren't getting kicked. I end up having 3 or 4 users that show logged in when I do a 'who', but they really aren't

Any ideas?