Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Corrupted /var/run/utmp and others

Posted on 2000-02-14
4
Medium Priority
?
724 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 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

963 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