[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: localhost in /etc/hosts



On 21.11.06 12:43, Vincent Lefevre wrote:
> On 2006-11-19 00:12:53 +0100, Matus UHLAR - fantomas wrote:
> > On 17.11.06 08:25, Vincent Lefevre wrote:
> > > On 2006-11-14 09:19:09 +0100, Matus UHLAR - fantomas wrote:
> > > > I do and I did. However, "hostname -s", contrary to hostname's
> > > > manual page, does not return first segment of the system
> > > > hostname, but resolves the FQDN first and returns first segment
> > > > of the resulting hostname. See my (refused) bugreport:
> > > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345761
> > > 
> > > The hosts man page is clear.
> > 
> > But the 'hostname' man page is not.
> 
> as expected. If you want to configure your /etc/hosts file, you should
> do "man hosts", not "man hostname". The hostname man page mentions
> /etc/hosts just for information; it doesn't use /etc/hosts directly
> anyway.

I was talking about problem with 'hostname', not problem with 'hosts'.
Why do you still talk about 'hosts'?

> > the problem is, many packages have unexpected behaviour when
> > 127.0.0.1 does not resolve to localhost.
> 
> Which package?
> 
> Also, you should report a bug. Do you have the numbers of the bug
> reports?

I've seen more of them, don't remember any. However, I don't have time to
try it...

One of possible problems was having "localhost" in hosts.allow or similar
files, which didn't match when 127.0.0.1 mapped to something else.

> > and I do think that 127.0.0.1 should map to localhost.
> 
> There's no need, and I don't see why it would be useful (except as
> a workaround for some bugs). The important is the opposite: localhost
> should resolve as 127.0.0.1.


> > (Sorry, I'm too lazy now to search the debian-devel discussion about
> > way to correctly setting up a hostname)
> 
> The best way IMHO is to have the host name identical to the FQDN.
> This makes things less ambiguous.

there often is no FQDN, as there is often no IP.
and I personally dislike having FQDN in hostname
(maybe because I grown up on sun/solaris, where it caused problems)

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"They say when you play that M$ CD backward you can hear satanic messages."
"That's nothing. If you play it forward it will install Windows."



Reply to: