Re: First line in /etc/hosts
On Sun, 13 Feb 2005 13:30:11 +0100, Steinar H. Gunderson wrote:
> Current d-i writes the following line to the beginning of /etc/hosts:
> 127.0.0.1 localhost.localdomain localhost
This is correct.
> Traditionally, this confuses some programs; at least pvm used to have
> problems with this, and I'm fairly sure cfengine2 doesn't like it either
If there are problems then they probably arise from a faulty _combination_
of /etc/hosts, hostname, /etc/nsswitch.conf and /etc/resolv.conf settings.
> so we've changed to
> 127.0.0.1 <machinename>.<our domain> <machinename> localhost
> However, now we've suddenly discovered that _other_ programs get confused by
So revert the change?
> In particular, if you use an NFSv4-patched mount, it does a
> gethostname() and resolves that, which returns 127.0.0.1, which in turn makes
> it happily use that as a client identifier to the remote server. (This breaks
> when two or more such clients connect, obviously.)
Make your /etc/hosts look like this:
127.0.0.1 localhost.localdomain localhost
w.x.y.z <machinename>.<our domain> <machinename>
Make w.x.y.z either the permanent IP address of your machine's permanently
connected network adapter, or, if it does not have one of those,