I've installed ubuntu on my computer at work because I think it is a perfect system for work which I do but I got some issues. I can't resolve domains from windows DNS server. Basically, we have two servers, one is Windows server (DNS sever) and another one is ubuntu 12.04 (LAMP). So every time when I create new project I have to create new alias on DNS server for example project1.localdomain.local which points to ubuntu server. On ubuntu server I have to create the project in directory /var/www/project1/htdocs. Everything works for computers in local network with windows or for macs. So basically when I am trying open a link http://project1.localdomain.local in a browser it works. But when I do it on my computer with fresh ubuntu installation it doesn't. It looks like ubuntu can't resolve local domain where DNS server is.

So my network looks like that: - DNS server - windows server domain - test

I've already tried resolved the problem adding lines to /etc/resolve.conf file

domain test

/etc/NetworkManager/NetworkManager.conf file I commented out line


/etc/dhcp/dhclient.conf I added lines

supersede domain-name "test";
prepend domain-name-servers,;

But it doesn't work.

On windows or mac I don't have to do any additional configuration to make it work.

This is the contents of /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
  • Hi Sneetsher, this is the contents: inline code in backticks – Rafal B Feb 5 '14 at 10:51

Change hosts line:

hosts:          files dns mdns4_minimal [NOTFOUND=return] mdns4

.local is used by mDNS (Avahi), dns should comes first.

See http://www.lowlevelmanager.com/2011/09/fix-linux-dns-issues-with-local.html

| improve this answer | |
  • It was exactly that, thank you very much Sneetsher, you save me a lot of time. – Rafal B Feb 5 '14 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.