home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] hosts Problem

Dave Edwards wrote:

There's something wrong with my system's understanding of its
hostname.  The source:

$ head -2 /etc/hosts
127.0.0.1 localhost
127.0.0.1 bigstory.homelinux.org bigstory

$ cat /etc/hostname
bigstory

The symptoms:
$ hostname
bigstory localhost.localdomain

$ hostname -f
hostname: Unknown host

$ hostname -a
hostname: Unknown host

$ sudo ls /dev/null # or any sudo command
sudo: unable to lookup bigstory localhost.localdomain via gethostbyname()
/dev/null

It also affects mutt's ability to use GPG and temp files, a DCOPserver,
and probably other stuff I have yet to encounter.

I've restarted the network, and I've also rebooted.  Neither effected
the cure.  Can someone help me get to the bottom of this?

Dave.
What is in your /etc/host.conf file?

It could be that the resolver is trying to get the hostname via DNS.

references