Bug 128458 - Default /etc/hosts isn't in correct format (alias before canonical_hostname)
Default /etc/hosts isn't in correct format (alias before canonical_hostname)
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: anaconda (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
:
: 128459 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-07-23 02:16 EDT by Mike MacCana
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Mike MacCana 2004-07-23 02:16:43 EDT
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:
 127.0.0.1       localhost       localhost.localdomain

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

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


How reproducible:
Always

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 02:22:51 EDT
*** Bug 128459 has been marked as a duplicate of this bug. ***
Comment 2 Jeremy Katz 2004-08-03 13:45:23 EDT
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 19:57:16 EDT
Thanks for the quick response. Tho it sounds more like WONTFIX than
NOTABUG.

Could you provide more detail about what breaks? Maybe that should be
fixed too?
Comment 4 Jeremy Katz 2004-08-03 19:59:41 EDT
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-03 20:23:04 EDT
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-03 22:48:06 EDT
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.