Bug 10635 - wrong /etc/hosts?
Summary: wrong /etc/hosts?
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: installer
Version: 7.0
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Elliot Lee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
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:
Clone Of:
Environment:
Last Closed: 2001-07-19 01:40:28 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael Redinger 2000-04-07 14:59:26 UTC
After installation, /etc/hosts contains something like this:
127.0.0.1     [hostname] localhost.localdomain localdomain

Generally on Unix, this should be
127.0.0.1     [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
sendmail.

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 127.0.0.1 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 127.0.0.1,
right?

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

127.0.0.1  localhost.localdomain localhost

127.0.0.1 resolves to "localhost.localdomain". We are (at least) proposing to
use:

127.0.0.1  localhost localhost.localdomain

so that it resolves to just "localhost".

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

Actually, changing the 127.0.0.1 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.