LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - General
User Name
Password
Linux - General This 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
 
Thread Tools
Old 10-27-2004, 02:34 PM   #1
jlassiter
LQ Newbie
 
Registered: Sep 2004
Location: Landrum, SC
Distribution: Debian
Posts: 17
Thanked: 0
How can I get rid of an inactive session ?


[Log in to get rid of this advertisement]
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:~$
jlassiter is offline     Reply With Quote
Old 10-27-2004, 02:51 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 23,977
Thanked: 8
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.
trickykid is offline     Reply With Quote
Old 10-27-2004, 03:00 PM   #3
jlassiter
LQ Newbie
 
Registered: Sep 2004
Location: Landrum, SC
Distribution: Debian
Posts: 17
Thanked: 0

Original Poster
Thank you.

Is it OK to edit/delete these files?
jlassiter is offline     Reply With Quote
Old 10-28-2004, 08:48 AM   #4
jlassiter
LQ Newbie
 
Registered: Sep 2004
Location: Landrum, SC
Distribution: Debian
Posts: 17
Thanked: 0

Original Poster
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.
jlassiter is offline     Reply With Quote
Old 10-28-2004, 09:27 AM   #5
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: West Sussex, England
Distribution: Gentoo
Posts: 1,454
Thanked: 0
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?
oneandoneis2 is offline     Reply With Quote
Old 10-28-2004, 11:51 PM   #6
jlassiter
LQ Newbie
 
Registered: Sep 2004
Location: Landrum, SC
Distribution: Debian
Posts: 17
Thanked: 0

Original Poster
touch /var/run/utmp got who to work again.

My thanks to those who replied.
jlassiter is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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


All times are GMT -5. The time now is 04:21 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration