Hostname problems in CentOS 5.5

Posted by spoon16 on Server Fault See other posts from Server Fault or by spoon16
Published on 2010-06-01T07:17:00Z Indexed on 2010/06/01 7:23 UTC
Read the original article Hit count: 368

Filed under:
|
|

I just set up a CentOS 5.5 machine on my local network and attempted to modify the hostname by editing /etc/sysconfig/network file. When I'm logged in locally the change to the hostname is reflected and seems to be working fine. When I open a SSH session via PuTTY from Windows this is what I see at the prompt:

[root@? ~]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=mini.local
[root@? ~]# sysctl kernel.hostname
kernel.hostname = ?
[root@? ~]# hostname
?
[root@? ~]# hostname -f
hostname: Unknown server error

A couple of other symptoms that may be helpful in troubleshooting this problem. I can ping the CentOS box from my Windows machine via IP but not hostname. Also, my Netgear router does not display the hostname when I view the "Connected Devices", I do see the mac address and the proper IP listed though.

How can I make it so that the hostname is properly propagated throughout my network?

© Server Fault or respective owner

Related posts about linux

Related posts about centos