# [SOLVED] /etc/hosts file ignored

## gustafson

Hi all,

I can't ping any host listed in /etc/hosts.

For example: if this is host file:

```
127.0.0.1 localhost

192.168.0.5     something
```

```
# ping localhost

PING localhost (127.0.0.1) 56(84) bytes of data.

64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.016 ms

# ping something

ping: unknown host something
```

Any ideas?Last edited by gustafson on Tue Aug 18, 2015 11:38 am; edited 1 time in total

----------

## gustafson

Answering my own question... (spent several hours trying to fix and found it moments after posting)

/etc/nsswitch.conf was empty.  (I had re-installed glibc via a pkg rather than a compile... and it didn't include the config file).

Thanks for looking.

----------

## toralf

 *gustafson wrote:*   

> Answering my own question... (spent several hours trying to fix and found it moments after posting)

 Then  there's one thing to do : please prepend the title of this thread with a "solved"  :Smile: 

----------

