Bug 128458

Summary: Default /etc/hosts isn't in correct format (alias before canonical_hostname)
Product: Red Hat Enterprise Linux 3 Reporter: Mike MacCana <mmaccana>
Component: anacondaAssignee: Jeremy Katz <katzj>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: nobody+pnasrat
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-08-03 17:45:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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:
 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 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
NOTABUG.

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.