LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-14-2008, 11:35 AM   #1
rozilla
Member
 
Registered: Dec 2006
Distribution: Ubuntu 8.04
Posts: 72

Rep: Reputation: 15
Logging out other users


At our computer lab I often find that some users have locked the screen. Others are still able to log in by clicking 'Switch User'. However, the previous user still stays logged into his/her session. How can I as an admin log these users out, when they lock their screen and stay away for hours? Any ideas?
 
Old 07-14-2008, 11:38 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Kill their desktop manager session.
 
Old 07-14-2008, 11:55 AM   #3
DragonM15
Member
 
Registered: Sep 2003
Location: USA
Distribution: Slackware (Multiple Versions)
Posts: 455

Rep: Reputation: 31
Quote:
Originally Posted by colucix View Post
Kill their desktop manager session.
That is what I would do. furthermore you could also kill any other applications that are being ran by that user. I find that if I kill my own desktop manager, some of those programs that were running while I had my X session running REMAIN running, and I cannot open that application again until I kill the process manually. Just some thoughts.

DragonM15
 
Old 07-14-2008, 12:00 PM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by DragonM15 View Post
some of those programs that were running while I had my X session running REMAIN running
Another method to completely kill a user (I mean... not physically...) can be
Code:
skill KILL -u username
this will send a KILL signal to all the processes belonging to the user. See man skill for details.
 
Old 07-14-2008, 12:01 PM   #5
0.o
Member
 
Registered: May 2004
Location: Raleigh, NC
Distribution: Debian, Solaris, HP-UX, AIX
Posts: 208

Rep: Reputation: 35
pkill -u <user>
 
Old 07-14-2008, 12:52 PM   #6
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
TMOUT=<seconds>

Place this in /etc/profile for system wide defaults. It will logout those inactive for the time in seconds you specify. 10 minutes or so is probably a good setting with a lot of traffic on public terminals/machines, etc.
 
Old 07-14-2008, 02:41 PM   #7
rozilla
Member
 
Registered: Dec 2006
Distribution: Ubuntu 8.04
Posts: 72

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by 0.o View Post
pkill -u <user>
that did it! thank u.

thanks everybody for all this helpful info! :-)
 
Old 08-08-2008, 12:34 PM   #8
DragonM15
Member
 
Registered: Sep 2003
Location: USA
Distribution: Slackware (Multiple Versions)
Posts: 455

Rep: Reputation: 31
Quote:
Originally Posted by 0.o View Post
pkill -u <user>
Thank you for refreshing my memory, I knew there was a simple way to kill all processes from a certain user, skill appears to work great as well, I have just used pkill before.

DragonM15
 
Old 08-08-2008, 02:17 PM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by rozilla View Post
that did it! thank u.

thanks everybody for all this helpful info! :-)
You should still implement the TMOUT so you don't find yourself going around killing user processes all the time.
 
  


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
logging printer users SyCo123 Linux - Networking 1 01-22-2008 05:06 PM
know users who are logged in without logging in cad Linux - Networking 6 01-08-2007 11:58 AM
disable all users from logging in acaj5 Linux - Newbie 3 06-08-2006 01:56 AM
logging wireless users linuxhippy Slackware 4 04-15-2005 10:52 AM
users and logging in Robert0380 Linux - General 7 09-01-2003 06:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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