Solved

Corrupted /var/run/utmp and others

Posted on 2000-02-14
4
691 Views
Last Modified: 2013-12-16
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?

Nick
0
Comment
Question by:biggleswat
4 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2525727
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?

0
 
LVL 2

Expert Comment

by:red031197
ID: 2526984
are all the login shells the same?
does who wrok correctly?
0
 
LVL 2

Accepted Solution

by:
ventolin earned 100 total points
ID: 2528108
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.

or

have you checked the permissions of these files?

or

a problem with:

xterm
init/inittab
getty
login
xdm
ftpd
telnetd
date

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

0
 

Author Comment

by:biggleswat
ID: 2535225
Thanks.  That helped quite a bit.


-- Nick
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wifi not working on Raspberry Pi 3? 2 53
nagios monitor 3 54
Why isnt it sending mail from my php but is from my server 10 44
how to install java on RHEL image on EC2 4 26
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question