Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 749
  • Last Modified:

Corrupted /var/run/utmp and others

Okay, here is the deal...

I have two boxes running RedHat 6.  They are both having the same problem; the /var/run/utmp file is constantly getting corrupted.  Top won't run, and everytime I log in now, it sets my terminal to "dumb" automatically.  I can manually change it to something like vt100 or linux, but I need to fix the /var/run/utmp problem as I think it is the root of the cause.  
I have tried re-creating the utmp file by doing a touch /var/run/utmp but when I logout and back in the file is corrupted again.  I don't have any problems when I ssh in via SecureCRT (except for top not working).  I'm guessing that ssh doesn't use utmp for the terminal settings.  So I'm kinda stumped why this file keeps on corrupting.  Any ideas?

1 Solution
If you've got two instances of this and the rest of the world (as far as we know) doesn't have the problem, then it's likely that something is different about your systems. Whatever it is, it appears to be common to both.

First, what leads you to believe that utmp is being corrupted? A quick check of the top sources doesn't turn up any references to utmp. It does need to be able to read stuff out of /proc, but I don't see any place that it reads utmp. As to the terminal type, if you look at the manpage for utmp you'll see that there isn't any field in the utmp structure to hold the terminal type. Accordingly, that's not the cause of the terminal type being set to dumb.

How does top fail? Have you changed the shell binary or done any fiddling with the shell rc files?

are all the login shells the same?
does who wrok correctly?
the utmp struct from libc5 has changed in libc6. Because of this, binaries
using the old libc5 struct will corrupt /var/run/utmp and/or /var/log/wtmp.


have you checked the permissions of these files?


a problem with:


there has been an update to the initscripts-4.64-1.i386 RPM

biggleswatAuthor Commented:
Thanks.  That helped quite a bit.

-- Nick
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now