Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 10635 - wrong /etc/hosts?
wrong /etc/hosts?
Product: Red Hat Linux
Classification: Retired
Component: installer (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Elliot Lee
Depends On:
  Show dependency treegraph
Reported: 2000-04-07 10:59 EDT by Michael Redinger
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-18 21:40:28 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 Michael Redinger 2000-04-07 10:59:26 EDT
After installation, /etc/hosts contains something like this:     [hostname] localhost.localdomain localdomain

Generally on Unix, this should be     [hostname] localhost

- no localhost.localdomain. Otherwise, the reverse resolution might not
work for some applications. However, maybe there are ways around this in
the C library, don't know ...
Comment 1 Erik Troan 2000-04-10 14:30:59 EDT
Not having the full localhost.localdomain hostname causes problems with
Comment 2 Daniel Roesen 2000-11-29 11:55:01 EST
Accepted, but please change the sequence, so that "localhost" comes _before_
"localhost.localdomain", otherwise always gets resolved to the
annoying "localhost.localdomain" instead of just "localhost" as one expects.

I assume sendmail needs to FORWARD resolve localhost.localdomain to,

Reopening and changing version to 7.0 as this problem persists in 7.0, too.
Comment 3 Elliot Lee 2001-07-18 20:22:54 EDT
Apologies for the unresponsiveness of the previous package maintainer...

The first hostname after the IP is always used for IP -> name resolution. The
position of localhost.localdomain vs localhost has no effect.
Comment 4 Daniel Roesen 2001-07-18 21:40:24 EDT
Sorry, but it _has_ an effect, as you point out yourself. It's the _first_ name
which is used for IP->Name resolution.

So with the current  localhost.localdomain localhost resolves to "localhost.localdomain". We are (at least) proposing to
use:  localhost localhost.localdomain

so that it resolves to just "localhost".

"localhost.localdomain" is just _ugly_ as hell and<->"localhost" is
common UNIX, as Michael already pointed out in his original filing.

Actually, changing the line in /etc/hosts is something I do on every
machine I install. "localhost.localdomain" makes me puke (as does sendmail). :-)
Comment 5 Elliot Lee 2001-07-19 13:31:48 EDT
It has no effect in the examples given, which had a hostname.

You need to set a hostname for your computer to get the desired behaviour. If
you don't, I could care less how aesthetically beautiful you think
'localhost.localdomain' is - it works fine :)

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