LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 09: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, 09:10 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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, 09:11 PM   #3
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
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, 09: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, 09:19 PM   #5
ckoniecny
Member
 
Registered: Oct 2005
Posts: 162

Rep: Reputation: 30
Check out skill also.

skill -9 user
 
Old 04-01-2006, 10: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



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 08:29 PM
Kicking Users coindood Linux - General 2 03-10-2004 08:25 AM
Kicking users question dtugg Linux - Networking 0 02-23-2004 06:41 PM
kicking out users im1crazyassmofo Linux - General 4 06-21-2003 08:16 PM
Proftpd kicking users unique3 Linux - Software 0 02-26-2003 10:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:15 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