Bug 128458 - Default /etc/hosts isn't in correct format (alias before canonical_hostname)
Summary: Default /etc/hosts isn't in correct format (alias before canonical_hostname)
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: anaconda (Show other bugs)
(Show other bugs)
Version: 3.0
Hardware: All Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
: 128459 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2004-07-23 06:16 UTC by Mike MacCana
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-03 17:45:23 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Mike MacCana 2004-07-23 06:16:43 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040706 Firefox/0.9 (but why does that matter?)

Description of problem:
The default /etc/hosts file isn't in the correct format. According to
'man hosts', our own documentatation, GLS training material, and the
RFC, the format is as follows:

IP_address canonical_hostname aliases

from the man page:
"Aliases  provide  for  name changes, alternate spellings, shorter
hostnames, or generic hostnames (for example, localhost)."

Our current file is as follows:       localhost       localhost.localdomain

I.e, the alias is before the canonical hostname.

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

How reproducible:

Steps to Reproduce:
1.Install RHEL
2.Look at default /etc/hosts file
3.Compare to documentation

Actual Results:  The file is in the wrong format - the alias is in the
first column, the canonical_hostname is in the second.

Expected Results:  The file should be as documented.

Additional info:
Hope I got the component right - if not, please change accordingly.
Thanks guys.

Comment 1 Mike MacCana 2004-07-23 06:22:51 UTC
*** Bug 128459 has been marked as a duplicate of this bug. ***

Comment 2 Jeremy Katz 2004-08-03 17:45:23 UTC
This has been this way for years now.  Unfortunately, doing anything
else causes things to break in environments where you are at all
disconnected from a network (ie, your dhcp server is down or you're on
a laptop or anything like that)

Comment 3 Mike MacCana 2004-08-03 23:57:16 UTC
Thanks for the quick response. Tho it sounds more like WONTFIX than

Could you provide more detail about what breaks? Maybe that should be
fixed too?

Comment 4 Jeremy Katz 2004-08-03 23:59:41 UTC
Services such as httpd, sendmail, etc which count on the hostname
being correct.  Also, X was known to break (although it was less common).

The details are a little fuzzy to me at this point since it's been
about 3.5 years since the last time I had this discussion and that was
with ewt and msw :)

Comment 5 Mike MacCana 2004-08-04 00:23:04 UTC
Interesting. I've been fixing this for classes and I havenb't run into
too many problems, using either localhost or localhost.localdomain to
refer to services including httpd and postfix. X works fine too.

Could we fix this in a test release? If httpd or sendmail have a
problem with a correctly specified hosts file, then it should be
resolved easily.

Comment 6 Jeremy Katz 2004-08-04 02:48:06 UTC
You're not going to see the problem in classes where you have
workstations that are perpetually connected.  It's a major problem on
laptops, especially when pcmcia gets thrown into the mix.

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