Red Hat Bugzilla – Bug 122732
Modifying hostname doesn't update /etc/hosts
Last modified: 2007-11-30 17:07:01 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET
Description of problem:
When you go to the DNS tab and modify the hostname field, then go
File->Save and restart network services the /etc/hosts file is not
updated to reflect the fact that 127.0.0.1 is the new hostname.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. During install hostname set to "hostone"
2. After install use GUI to set hostname to "hosttwo"
Actual Results: /etc/hosts still says "hostone" is the localhost
instead of "hosttwo"
Expected Results: /etc/hosts should say "hosttwo" is the localhost,
right, /etc/hosts should be modified... but /etc/sysconfig/network is
modified. In real networks the IP address should not be 127.0.0.1
In Fedora Core 2, both /etc/sysconfig/network and /etc/hosts are not
updated by system-config-network when trying to change hostname.
An errata has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.