[rhn-users] hostname in 'localhost' line of /etc/hosts
"Dr. Günter Schmidt"
guenter.schmidt at bruker.de
Fri Jul 22 07:33:24 UTC 2005
Hallo all,
I have just finished another RHEL3-U4 installation.
This time i disabled during installation the button
'Get hostname with DHCP'
and checked
'Enter hostname manually'
and entered the new hostname.
(That is our network configuration: each client may sent a new hostname
to the DHCP server, and will be accepted and added to DNS service).
After the first time boot I did a recursive grep in /etc for the new
hostname
and found the following places:
[root at buxus root]# grep -r buxus /etc/ > hostname.log
grep: /etc/alternatives/print-cancelman: No such file or directory
[root at buxus root]# cat hostname.log
/etc/sysconfig/network:HOSTNAME=buxus
/etc/hosts:127.0.0.1 buxus localhost.localdomain localhost
Then I started the network configuration tool, enabled the DCHP_HOSTNAME
saved all and devativate/avtivate the eth0 device:
[root at buxus root]# neat
[root at buxus root]# grep -r buxus /etc/ > hostname-after-neat.log
grep: /etc/alternatives/print-cancelman: No such file or directory
[root at buxus root]# cat hostname-after-neat.log
/etc/sysconfig/network-scripts/ifcfg-eth0:DHCP_HOSTNAME=buxus
/etc/sysconfig/networking/devices/ifcfg-eth0:DHCP_HOSTNAME=buxus
/etc/sysconfig/networking/profiles/default/ifcfg-eth0:DHCP_HOSTNAME=buxus
/etc/sysconfig/networking/profiles/default/hosts:127.0.0.1
buxus localhost.localdomain localhost
/etc/sysconfig/networking/profiles/default/network:HOSTNAME=buxus
/etc/sysconfig/network:HOSTNAME=buxus
/etc/hosts:127.0.0.1 buxus localhost.localdomain localhost
/etc/dhclient-eth0.conf:send host-name "buxus"; # temporary RHL
ifup addition
The suspicious line in /etc/hosts is still there, and with the default
setup of
/etc/nsswitch.conf with the line
hosts: files dns
this file has always priority before the name server.
Best Regards
Günter
--
Dr. Günter Schmidt | E-Mail: gsc at bruker.de
NMR Software | Tel: +49 721 5161 443
Bruker BioSpin GmbH | Fax: +49 721 5161 480
More information about the rhn-users
mailing list