Change hostname for RHEL Server and old hostname shows up under /var/log/messages

Latest response

So I'm working on creating a template in vSphere from a RHEL 5 x86_64 server following a number of howtos I've found online.

Everything works great, except for the hostname.

If I change the hostname and reboot, the old hostname still shows up under /var/log/message.

We have some 3rd party backup software from CommVault that might be the culprite however I thought of this once I left work yesterday.

Has anyone had an experiences with this and how they went about fixing it.

thanks

Responses

Hi Chris,

For the RHEL 5 system you speak of, make sure the HOSTNAME directive in /etc/sysconfig/network (this is a file) is properly cited See this Red Hat Solution ID 4725, before the reboot.

EXAMPLE entry in /etc/sysconfig/network:

HOSTNAME=rhel5ws23.yourdomainname.xyz

(note, replace everything after the "equals sign" (=) with your values, including the "xyz" above with the proper ending of your fully qualified domain name).

Also check if someone put something in /etc/rc.local (that would be very odd, but check anyway) to set the hostname upon every reboot.

Please let us know if this resolves the issue.

Thanks

Yes, this worked.

I've noticed with RHEL5 that alot of the values such as network and resolv end up here, so for future troubleshooting this is another place to look into .

thanks again

Cool, glad this worked for you Chris,

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.