2

I have an Ubuntu server called crow:

$ hostname
crow

But when I try to ping it (from itself), I get unknown host:

$ ping crow
ping: unknown host crow

This is despite explicitly adding crow to /etc/hosts:

$ sudo cat /etc/hosts
127.0.0.1       localhost crow

What am I doing wrong?

Additional info in response to comments:

The hosts line of /etc/nsswitch.conf looks like this:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
ThatGraemeGuy
  • 15,473
  • 12
  • 53
  • 79
sanity
  • 739
  • 3
  • 9
  • 16

1 Answers1

5

Check permissions on /etc/hosts and /etc/nsswitch.conf files. They should be world-readable.

rvs
  • 4,125
  • 1
  • 27
  • 31