Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] /etc/hosts file ignored
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
gustafson
Guru
Guru


Joined: 12 Aug 2004
Posts: 430

PostPosted: Tue Aug 18, 2015 1:56 am    Post subject: [SOLVED] /etc/hosts file ignored Reply with quote

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

For example: if this is host file:

Code:
127.0.0.1 localhost
192.168.0.5     something


Code:
# 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
Back to top
View user's profile Send private message
gustafson
Guru
Guru


Joined: 12 Aug 2004
Posts: 430

PostPosted: Tue Aug 18, 2015 2:07 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Tue Aug 18, 2015 9:30 am    Post subject: Reply with quote

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" :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum