Bug 122732 - Modifying hostname doesn't update /etc/hosts
Modifying hostname doesn't update /etc/hosts
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: redhat-config-network (Show other bugs)
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Harald Hoyer
Depends On:
Blocks: 86560
  Show dependency treegraph
Reported: 2004-05-07 11:32 EDT by Louis Aslett
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-01 23:15:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Louis Aslett 2004-05-07 11:32:24 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET 
CLR 1.1.4322)

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 is the new hostname.

Version-Release number of selected component (if applicable):

How reproducible:

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, 

Additional info:
Comment 1 Harald Hoyer 2004-05-10 03:43:23 EDT
right, /etc/hosts should be modified... but /etc/sysconfig/network is
modified. In real networks the IP address should not be
Comment 2 Marie Lund 2004-06-16 09:36:53 EDT
In Fedora Core 2, both /etc/sysconfig/network and /etc/hosts are not
updated by system-config-network when trying to change hostname.
Comment 3 Jay Turner 2004-09-01 23:15:47 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.