Click to See Complete Forum and Search --> : redhat hat, dhcp and hostname


miker
11-22-2002, 01:35 PM
here's my story:

so i setup a rh8 box on the corporate lan using dhcp.

a kernel update and a reboot later i notice that the hostname has changed so lots of stuff breaks (httpd, gnome login latency etc..)

so i # out the relevent bits of dhclient-script and reboot

but the 'alien' name has stuck.

i can issue a hostname command once per session to get everything working again but this is hardly ideal

my /etc/hosts and /etc/sysconfig/network are both in order, and /etc/HOSTNAME does not exist so i assume it is unused in rh8

if fact, even after issuing a hostname, if i do a netstat it still shows connection to the localhost 'alien' name which has stuck (the actual name that has stuck is sas3926w2k but that should be immaterial).

i just want it back to localhost.localdomain, with samba/wins/dns handling my name resolution.

has this box been compromised in some way?

should i just stick the hostname command in inittab somewhere?

maine
11-22-2002, 03:14 PM
Check in the /etc/sysconfig directory and change the hostname in the network file. If the HOSTNAME line isn't present just add it. That should get it.

NETWORKING=yes
HOSTNAME=whatever

p.s check the /etc/hosts file