[wplug] Hostname behavior
Brandon Kuczenski
brandon at 301south.net
Thu Sep 14 15:08:40 EDT 2006
On Thu, 14 Sep 2006, Jonathan S. Billings wrote:
> 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.
>
OK. I removed 'plaza' from the 127.0.0.1 line and that seemed to work. I
hadn't counted on /etc/hosts being used for reverse lookups..
Thanks,
brandon
More information about the wplug
mailing list