LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-13-2007, 12:18 AM   #1
SpecialAgentR
LQ Newbie
 
Registered: May 2007
Distribution: RHEL4, Fedora 7
Posts: 26

Rep: Reputation: 15
Kicking remote users


Code:
[root@localhost ~]# who
root     tty1         May 11 11:39
rml0520  :0           May  9 09:13
rml0520  pts/1        May 12 13:17 (:0.0)
root     pts/1        May  9 10:02 (192.168.1.4)
root     pts/2        May 10 11:27 (192.168.1.4)
What would be the easiest way to kill both of the root users pts/1 and pts/2 that are connected through the 192 ip addresses? Thanks!
 
Old 05-13-2007, 12:51 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could use ps or lsof to determine their PIDs and use kill to terminate their terminals.

man kill
man ps
man lsof
kill -l

Last edited by jschiwal; 05-13-2007 at 01:52 AM.
 
Old 05-13-2007, 02:02 AM   #3
unknownmosquito
Member
 
Registered: Dec 2005
Distribution: Fedora 8
Posts: 57

Rep: Reputation: 15
or you can

Code:
ps aux | grep ssh
pkill [processnumber]
where [processnumber] is the number of the ssh process that the user is using to log into your system.

And if you want to keep a specific user out, as root you can run

Code:
passwd -l [username]
And then they cannot sign back in, because their password is locked. Unlock it with

Code:
passwd -u [username]
logically.


Ian
 
  


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 out hopesfall Linux - General 6 08-04-2006 05:28 PM
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:10 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
Open Source Consulting | Domain Registration