LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-20-2010, 07:33 AM   #1
Mark1986
Member
 
Registered: Aug 2008
Location: Netherlands
Distribution: Xubuntu
Posts: 87

Rep: Reputation: 11
Log others users out


Hi,

Currently I am trying to set up PuTTy from my Windows laptop to my Xubuntu laptop. (My Windows laptop is one I got from work. I want to use some Linux commands, since it's easier and performing faster.)

I got to the point where there are 5 accounts logged in. test@tty1, mark@tty8, test@pts/1, test@pts/2 and test@pts/0.

I didn't know which one I am at the moment with my laptop (since I shut down some PuTTy instances). So I used: vi newfile1 using PuTTy and went over to my other laptop (the Xubuntu one) and used w. It shows that I am logged in with PuTTy at the moment as test@pts/0.

This means I have got test@pts/1 and test@pts/2 as users I cannot access anymore ( I think... ). So I want to log them out.

Logging them out seems a hassle, since I can't use PuTTy anymore ( closed those windows...). Searching on google, I came across SKILL. I used sudo skill -STOP -u test@pts/1. This gave me the response: ERROR: -u used with bad data. Looking at the man page, nothing really cleared up for me.

Can anyone push me a bit more in the right direction?

Thanks in advance.
 
Old 11-20-2010, 07:58 AM   #2
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
There is a command 'slay' in debian but I am not sure if you can log people out that way.
Then there is 'lsof' read man lsof and you should be able to log users out . This command is just awesome.
 
Old 11-20-2010, 08:23 AM   #3
Mark1986
Member
 
Registered: Aug 2008
Location: Netherlands
Distribution: Xubuntu
Posts: 87

Original Poster
Rep: Reputation: 11
I tried to find slay, but either I could not find it or it is not installed. I could not find a man page for xubuntu for the slay command. It seems to be Debian only.

I fail to see how the lsof command can help me log users out.
 
Old 11-20-2010, 09:24 AM   #4
Bertical
Member
 
Registered: Oct 2008
Distribution: Slackware
Posts: 77

Rep: Reputation: 12
You were on the right track with
Code:
skill -KILL -u test
 
Old 11-20-2010, 09:32 AM   #5
Mark1986
Member
 
Registered: Aug 2008
Location: Netherlands
Distribution: Xubuntu
Posts: 87

Original Poster
Rep: Reputation: 11
Thing is, if I use that command, I can only logout the user with which I am currently busy. I want to be able to kill 1 of the test users, using mark (which has root priveliges).
 
Old 11-20-2010, 09:46 AM   #6
Bertical
Member
 
Registered: Oct 2008
Distribution: Slackware
Posts: 77

Rep: Reputation: 12
You could try
Code:
skill -KILL -t pts/1
but you would need to know which terminal your users are on.
 
1 members found this post helpful.
Old 11-20-2010, 09:49 AM   #7
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
Originally Posted by Bertical View Post
You could try
Code:
skill -KILL -t pts/1
but you would need to know which terminal your users are on.
Code:
who
 
1 members found this post helpful.
Old 11-20-2010, 11:06 AM   #8
Mark1986
Member
 
Registered: Aug 2008
Location: Netherlands
Distribution: Xubuntu
Posts: 87

Original Poster
Rep: Reputation: 11
Thank you guys, I got it solved now!

First I use 'who' to determine the terminal.

Next I use 'sudo skill -KILL -t <terminal>'.

I first used the skill command without sudo, but that would not return an error nor would it actually log out the other user (for obivous reasons). With sudo it works fine, it however does not respond with a message the other user has actually been logged out.
 
  


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
No Users Can Log In; Only Root Can JWilliamCupp Linux - Software 8 02-07-2012 01:54 AM
Other users can't log in Paul_md Mandriva 2 01-22-2007 05:38 AM
Log off all users other than root Skywing Red Hat 14 11-16-2006 03:50 PM
root can log in, but not users walterbyrd Debian 7 02-08-2006 07:17 AM
users cannot log in nongente Mandriva 1 11-17-2003 11:58 AM


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