Why Ubuntu could treat hosts file so strange?

Posted by z4y4ts on Server Fault See other posts from Server Fault or by z4y4ts
Published on 2010-03-12T14:05:08Z Indexed on 2010/03/12 14:07 UTC
Read the original article Hit count: 362

Filed under:
|
|
|

I have almost fresh Ubuntu desktop box. OS was installed two weeks ago and updated from karmic repositories. Last week I had no problems with DNS. But this week something had changed. I'm not sure what and when, and not sure whether I changed any configs.

So now I have some really weird situation. According to logs name resolving should work normally.

/etc/hosts

127.0.0.1   localhost test
127.0.1.1   desktop

/etc/host.conf

order hosts,bind
multi on

/etc/resolv.conf

# Generated by NetworkManager
search search servers obtained via DHCP
nameserver 192.168.0.3

/etc/nsswitch.conf

passwd:         compat
group:          compat
shadow:         compat

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

But if fact it is not.

user@test ~>ping test

PING localhost (127.0.0.1) 56(84) bytes of data.
[skip]

Pinging is ok.

user@test ~>host test

test.myviacube.com has address xx.xxx.161.201

But pure

I suspect that NetworkManager might cause this misbehavior, but don't know where to start to check it. Any thoughts, suggestions?

© Server Fault or respective owner

Related posts about linux

Related posts about ubuntu