Bug 10635 - wrong /etc/hosts?
Summary: wrong /etc/hosts?
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: installer   
(Show other bugs)
Version: 7.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Elliot Lee
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-04-07 14:59 UTC by Michael Redinger
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-19 01:40:28 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 Michael Redinger 2000-04-07 14:59:26 UTC
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 18:30:59 UTC
Not having the full localhost.localdomain hostname causes problems with

Comment 2 Daniel Roesen 2000-11-29 16:55:01 UTC
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-19 00:22:54 UTC
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-19 01:40:24 UTC
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 17:31:48 UTC
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.