LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-06-2003, 09:17 AM   #1
bfloeagle
Member
 
Registered: Jun 2000
Location: Upstate New York
Distribution: Ubuntu
Posts: 158

Rep: Reputation: 30
Question Force logout


How do you force a logout of a user on your system?

Here's the setup:
A user is logged in to the server.
I log into server via SSH and SU to root.
That user is taking doing too much and needs to be kicked.

How do I as root, remotely, kick that user?

TIA!
Andy
 
Old 01-06-2003, 09:49 AM   #2
NSKL
Senior Member
 
Registered: Jan 2002
Location: Rome, Italy ; Novi Sad, Srbija; Brisbane, Australia
Distribution: Ubuntu / ITOS2008
Posts: 1,207

Rep: Reputation: 47
ps aux and get the PID of his bash, then kill -9 <PIDofBASH> and the user will get logged out.
-NSKL
 
Old 01-06-2003, 12:20 PM   #3
Ceonic
LQ Newbie
 
Registered: Jan 2003
Posts: 1

Rep: Reputation: 0
Cool Fastest way

You can try that command:

pgrep -u <username> bash|xargs kill -9


That are ready for making script.
Somthing like:

kickuser.sh
#!/bin/bash
pgrep -u $1 bash|xargs kill -9




enjoy


---
Ceonic info@core-it.org
CORE IT
http://www.core-it.org
 
Old 01-07-2003, 11:14 AM   #4
barrynewt
LQ Newbie
 
Registered: Aug 2002
Posts: 23

Rep: Reputation: 15
control alt backspace.
seems to work for me.
 
Old 01-07-2003, 02:34 PM   #5
then
Member
 
Registered: Oct 2002
Location: FDR India
Distribution: RH9, Knoppix, MEPIS
Posts: 65

Rep: Reputation: 15
Quote:
Originally posted by barrynewt
control alt backspace.
seems to work for me.
AFAIK that key-combo shuts down X and takes you back to your default run level. Didn't know it kills network connections too. Could some one please confirm this??

Regards
theN
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remotely Force Logout of other Users? CoolAJ86 Linux - Security 5 04-16-2005 06:51 AM
force the RAM! alaios Linux - General 4 09-22-2004 05:33 PM
On gnome / x logout run "logout" ?? once here Linux - Software 1 01-09-2004 02:53 PM
Want to force use of squidgaurd buttshill Linux - Networking 0 10-13-2003 04:24 PM
force eject? Trinity22 Linux - Newbie 4 08-03-2003 06:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration