LinuxQuestions.org
Visit Jeremy's Blog.
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 10-27-2004, 01:34 PM   #1
jlassiter
LQ Newbie
 
Registered: Sep 2004
Location: Landrum, SC
Distribution: Debian
Posts: 17

Rep: Reputation: 0
How can I get rid of an inactive session ?


How can I get rid of the root session listed below ? Rebooting didn't do it.

john@linuxbox:~$ who
john :0 Oct 27 13:56
root pts/0 Oct 21 09:42 (192.168.1.102)
john@linuxbox:~$
 
Old 10-27-2004, 01:51 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
That could be something running as root but my guess would be that your /var/run/utmp or wtmp file is reflecting the wrong info.. since you rebooted and it didn't go away.
 
Old 10-27-2004, 02:00 PM   #3
jlassiter
LQ Newbie
 
Registered: Sep 2004
Location: Landrum, SC
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you.

Is it OK to edit/delete these files?
 
Old 10-28-2004, 07:48 AM   #4
jlassiter
LQ Newbie
 
Registered: Sep 2004
Location: Landrum, SC
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
Deleted /var/run/utmp

I deleted /var/run/utmp and the spurious login disappeared. Actually 'who' reported no user logged in.

After a reboot it still reports no user logged in.
Guess I broke something.
 
Old 10-28-2004, 08:27 AM   #5
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 48
Important Rule: Never, ever delete a system file without knowing what it does. Rename it instead, then you can restore it if it turns out to be important

Quote:
The utmp file allows one to discover information about who
is currently using the system. There may be more users
currently using the system, because not all programs use
utmp logging.
There's plenty of stuff of Google about restoring a deleted or corrupted utmp. Lucky, eh?
 
Old 10-28-2004, 10:51 PM   #6
jlassiter
LQ Newbie
 
Registered: Sep 2004
Location: Landrum, SC
Distribution: Debian
Posts: 17

Original Poster
Rep: Reputation: 0
touch /var/run/utmp got who to work again.

My thanks to those who replied.
 
  


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
Firewalls are inactive Dolphin2005 Linux - Newbie 7 11-15-2005 05:25 PM
Start programs at startup and get rid of current saved session Shwiing Linux - Software 2 08-04-2005 01:14 AM
inactive servers LLS Linux - General 2 02-27-2005 05:48 PM
Network goes inactive beza Linux - Networking 7 10-15-2003 05:02 PM
networkdevice inactive cuboctahedron Linux - General 5 02-23-2003 03:18 AM

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

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