Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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: 10.10.16.1 - DNS server - windows server domain - test

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

domain test
nameserver 10.10.16.2

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

#dns=dnsmasq

/etc/dhcp/dhclient.conf I added lines

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

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
share|improve this question
    
Hi Sneetsher, this is the contents: inline code in backticks –  Rafal B Feb 5 at 10:51

1 Answer 1

up vote 1 down vote accepted

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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