Click to See Complete Forum and Search --> : Force user off machine


linuxluis
10-31-2001, 05:59 PM
Hello all, I was wondering if anyone could help me out. I have my linux rd 7.0 running . I have 2 other guys that use my linux in different cities. I notice that both of them leave there user log in running. I dont really like to boot my machine, but how on my side as the administrator log them out.

When I do the "w" command i see the.

"user" "tty" "from"

so how do i kill their login?

Thank you guys

Bishop ;-)

error27
10-31-2001, 07:12 PM
502~.$ apt-cache show slay
Package: slay
Priority: optional
Section: admin
Installed-Size: 76
Maintainer: Pawel Wiecek <coven@debian.org>
Architecture: all
Version: 1.2-13
Depends: debconf
Filename: pool/main/s/slay/slay_1.2-13_all.deb
Size: 6198
MD5sum: 56968500344a9717eed32cdc94647176
Description: kills all of the user's processes
Slay provides you with a way to quickly get rid of all
processes selected user owns. Very useful if you want
to harm somebody.

503~.$


(or you could do it manually)

bdg1983
10-31-2001, 08:05 PM
You could put a TMOUT in their bash_profile. TMOUT is mentioned in the bash manpage and also this from the NHF on Bash Commands.

TIMEOUT
When opening up a new bash session, you can specify how long to wait before the
shell automatically terminates with the TMOUT variable. The value of this variable is to
be set in the number of seconds to wait for user input before the shell self terminates.
If you add this to your /etc/profile or to your /etc/.bash_profile, as so:

TMOUT=60

bash will terminate the session after one minute. Here is what happens after one minute
of no user input:

xconsole$ timed out waiting for input: auto-logout

Linux 2.2.7

login:

As you can see, the user is immediately logged out and a new login prompt is issue.

stiles
10-31-2001, 09:18 PM
ps aux | grep <user_name>

then just kill the pid

If you have lots of users loged in and you want to end all their sessions do this:

#init S