When I start gnome .. I get an error and it tells me that there is a problem and it might be fixed by adding dhcp-966-63 to the /etc/hosts .. i did i added that exactly and im still getting the error it says that gnome might not work correctly .. if this error isn't fixed then it gives me an option to try again or continue anyways .. just wondering if there is a way to fix this ... i think it has something maybe to do with my isp or something but im really not sure thanks for reading this. I am running Redhat 8.0
PS I am very newbie so if you have suggestions please try and be discriptive in how to do things
What is your network configuration? Ie. what network cards do you have and what IP addresses are assigned to them. It's not the name of the cards themselves that I am after, but the interface names. If you don't know, start a terminal, and run "/sbin/ifconfig -a". That will list all interfaces and their data.
Also, what is your hostname? Get this by running "hostname" in the terminal.
it sounds like he is letting DHCP assign his hostname also, so he may have added it - but it has probably changed since then.
Yes, but shouldn't the dhcp client daemon add that to /etc/hosts, in that case?
i dont think that is the default , i think you would have to add a line to /etc/dhclient-exit-hooks to get that functionality - otherwise if you use a static hostname (which is more common i believe) it would overwrite it everytime, or spend time checking.
Now that you mention it, it's really not impossible. But it should at least be possible to configure dhclient not to set the hostname to what it got. I wouldn't imagine that it's actually used later.
echo "pick a hostname" > /etc/hostname
echo "127.0.0.1 localhost hostname-you-picked" > /etc/hosts
that is a wonderful onetime fix - next time he gets a different IP DHCP will overwrite this if he is getting his hostname from DHCP.\
Check your /etc/sysconfig/network for a line
if that line exists DHCP will not set your hostname for you(at least mine doesn't, so Im assuimg this is where it gets it from), so you can then add
127.0.0.1 your_host_name to /etc/hosts and gnome should be happy.
I'm sorry I can't speak for dhclient anymore... I've had to reinstall pump since dhclient wouldn't properly release leases and so made my DDNS unreliable.
Anyway, I think that all the HOSTNAME setting in /etc/sysconfig/network is used for is for actually setting the hostname. I don't think dhclient or any of its wrapping scripts uses it for not updating the hostname. Don't you think that yours just doesn't update the hostname since it doesn't get one from the DHCP server? Of course, it wouldn't hurt setting it, and it might be that if you don't have a proper hostname, dhclient will update it at will.
Anyway, isn't there an option for dhclient not to update the hostname?
I, too, would recommend against genlee's fix, however. Not only is it not RedHat compatible, it is also, as majorwoo stated, just a one time fix. The next time you update your lease, the hostname will be changed nonetheless.
It will work with redhat, just make the proper changes to where the files are located it. I use it with dhcpcd and it works. Dhcp does not overwrite any of my changes.