[wplug] Hostname behavior
Jonathan S. Billings
billings at negate.org
Thu Sep 14 14:52:04 EDT 2006
On Thu, Sep 14, 2006 at 02:23:26PM -0400, Brandon Kuczenski wrote:
> My computer is named 'plaza.' It says so in its /etc/hostname file, which
> contains 'plaza\n'. When I run 'hostname', 'plaza' is what's returned.
>
> However, when I run 'hostname -f', I get 'localhost.localdomain', which
> seems like a misconfiguration.
it looks like what's happening is that the hostname program is running
'gethostbyname(plaza)', which uses named, /etc/hosts and other methods
defined by your nsswitch.conf. Since 'plaza' is in /etc/hosts as
127.0.0.1 first, I suspect that is why you get back
localhost.localdomain. Changing /etc/hosts or the order in
/etc/nsswitch.conf would change the results.
--
Jonathan Billings <billings at negate.org>
Where are the calculations that go with a calculated risk?
More information about the wplug
mailing list