Web Hosting Talk







View Full Version : Can't run TOP, REBOOT, SHUTDOWN Help


tymonhall
11-21-2001, 12:04 AM
Hi, my server won't allow me to telnet in and reboot or run the top program. It gives the following error message then start acting weird "bad data in /var/run/utmp(null)

Anyone knows whats going on?

driverdave
11-21-2001, 12:20 AM
Do you mean you can't telnet in period, or you can't run those commands (reboot, top etc...) from the command line? What error do you get when you try to telnet?

Actually, de-ciphering your post, I'm guessing you can telnet in. Are you running those processes as root? Have you checked your bash-history? Have you checked your logs?

Have you tried a re-boot from the GUI, re-starting the telnet server from the GUI, or seeing what else is running/stopped from the GUI?

I have no idea what is in /var/run/utmp, but during my ssh session, it had, what looks to me, like data about who I am, what shell I'm running, where I'm logged in from, the machine I'm logged into, and a bunch of garbage characters.

Sorry for all the questions, but I don't think anyone can help you from what you initially posted.

William
11-21-2001, 12:24 AM
try -f reboot

or reboot -f

/sbin/reboot -f

alchiba
11-21-2001, 12:39 AM
I've heard of this. The file is used to store info about the logged-in user. Linux complains if it gets corrupted or is missing. Don't quote me on this, but it's entirely possible to simply kill the file and re-enter it with touch or a command like cp /dev/null /var/run/utmp

tymonhall
11-21-2001, 01:43 AM
I have rebooted it, I can't reboot it via telnet or the control panel. I have to call in and have it rebooted. I notice that when I reboot the server my self it will start the process but never finish.

I tried the reboot -f that didn't fix the problem


I've tried removing the file all together. I just notice that it was back again after a little bit. I've tried the last one cp /dev/null /var/run/utmp from the looks it is working right now. But I think this would be the same as me removing it.

alchiba
11-21-2001, 02:09 AM
cp /dev/null /path/to/file just creates an empty file or overwrites an existing one.

tymonhall
11-21-2001, 02:28 AM
Yea, well its back to it old self again. That worked for a few minutes but it didn't stay

tymonhall
11-22-2001, 04:46 PM
Now I can't login via telnet or ssh at all. I can still access the control panel and I can reboot the server from there.