LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-10-2006, 06:05 PM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Logout Users


When I run the command "users", I can see all the users logged into the box either locally or remotely. I would like to know how I can end someones session from the box. I can see below from the command that I (cwilliams) am logged in twice which is my GUI session and also my open terminal window. I think I may have ctl alt + F1 and logged in as root but how do I log out root from my current GUI session?

Code:
cwilliams@stormshadow:~$ users
cwilliams cwilliams root
 
Old 09-10-2006, 07:27 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Try w instead of users; gives you more detail. You can then compare the pts/tty
against the output of ps -A ... Getting rid of a session is then as easy as killing it ;}


Cheers,
Tink
 
Old 09-11-2006, 07:24 AM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Once I have "w" output in front of me, what can I do next to kill that users session?

Code:
cwilliams@cwilliams:~$ w
 08:23:48 up 2 min,  2 users,  load average: 0.31, 0.21, 0.09
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
cwilliam :0       -                08:21   ?xdm?  26.04s  0.29s x-session-manag
cwilliam pts/0    :0.0             08:23    0.00s  0.12s  0.00s w
 
Old 09-11-2006, 01:28 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
What I said above :)
Determine with TTY the process you want to kill is running
on, run ps -A, look for the tty in ps' output, remember the PID
and kill it.


Cheers,
Tink
 
Old 09-11-2006, 01:47 PM   #5
rhce1arun
LQ Newbie
 
Registered: Sep 2006
Posts: 13

Rep: Reputation: 0
hai
the possible answer is you can give ctrl+d or type exit or type logout. you will easily get out of the gui terminal

hope you will get the answer
 
Old 05-10-2007, 12:57 PM   #6
raazman
LQ Newbie
 
Registered: Feb 2005
Distribution: Suse 10.2
Posts: 19

Rep: Reputation: 0
so in this case it would be
Code:
ps -A 0
 
  


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
Struggling to setup a Debian/etch desktop: LDAP users and LOCAL users jferrando Linux - Networking 1 05-05-2006 03:44 PM
Remotely Force Logout of other Users? CoolAJ86 Linux - Security 5 04-16-2005 06:51 AM
who and finger reporting logout users untoldone Linux - Newbie 1 03-19-2004 11:53 PM
On gnome / x logout run "logout" ?? once here Linux - Software 1 01-09-2004 02:53 PM
Give users the option to shut down in Gnome's logout oot Linux - General 4 05-12-2003 06:15 PM

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

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