LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2006, 10:00 PM   #1
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Rep: Reputation: 30
Kicking users off system


Hi! I am searching for a command to kick users off a system. When I issue the w command and see selected users I would like to log them out.

Thanks
 
Old 04-01-2006, 10:10 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
You can use ps aux to figure out the process ID (pid) of their shell and then kill that process (via the kill command).
 
Old 04-01-2006, 10:11 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,131

Rep: Reputation: 333Reputation: 333Reputation: 333Reputation: 333
Use pkill and the username. e.g., if you want to wipe user "fred" out:
Code:
$ su
# pkill -u fred
#
This will kill all fred's processes (will send them a SIGTERM signal, actually). Loggin him out. You can due this with aditional predjudice with:
Code:
# pkill -9 -u fred
 
Old 04-01-2006, 10:19 PM   #4
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Thanks for the fast response you people rock.

Thanks
 
Old 04-01-2006, 10:19 PM   #5
ckoniecny
Member
 
Registered: Oct 2005
Posts: 162

Rep: Reputation: 30
Check out skill also.

skill -9 user
 
Old 04-01-2006, 11:37 PM   #6
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Thanks they all work perfectly now I can boot idlers.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kicking Users Verbal Kint Linux - General 6 11-02-2005 09:29 PM
Kicking Users coindood Linux - General 2 03-10-2004 09:25 AM
Kicking users question dtugg Linux - Networking 0 02-23-2004 07:41 PM
kicking out users im1crazyassmofo Linux - General 4 06-21-2003 09:16 PM
Proftpd kicking users unique3 Linux - Software 0 02-26-2003 11:36 PM


All times are GMT -5. The time now is 08:47 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration