3

I have recently set up a Windows AD domain controller with DNS and DHCP servers. Windows clients get their DNS server set to match what DHCP hands out but my Ubuntu 16.04 workstation only sets the loopback address and a search domain:

I had expected to see the setting nameserver 192.168.14.4 in /etc/resolveconf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search pdf-xchange.net

If I add dns-nameservers 192.168.14.4 to /etc/network/interfaces I see it in /etc/resolve.conf but I want some Ubuntu Desktops to use DHCP and not have to manually modify them.

Why does a DHCP client not add the DSN nameserver the way a static entry in /etc/network/interfaces does? I want this set as it is specified as a prerequisite for adding the machine to the AD domain:

The domain controller is the primary DNS resolver as specified in /etc/resolv.conf.

https://help.ubuntu.com/lts/serverguide/sssd-ad.html.en-GB#sssd-ad-requirements

0

The documentation is wrong here, or let's say not very exact. On a standard 16.04 workstation installation you will get what you see, resolv.conf pointing to localhost. An instance of dnsmasq running on port 53 will handle the DNS requests. The reasons for this are beyond this question.

Anyway you can list the DNS servers in use, as configured by network-manager, by running the following command:

$ nmcli dev show | grep DNS
IP4.DNS[1]:                             10.5.2.81
IP4.DNS[2]:                             10.5.2.82

For the sake of completeness, a command like the following would need to be used on a normal 18.04 installation:

$ systemd-resolve --status | sed '/DNS Servers/,$!d' 
  • Brilliant. Most appreciated. – Paul O'Rorke Aug 3 '18 at 18:20
  • Does that mean the answer was helpful? – Sebastian Stark Aug 4 '18 at 17:38
  • Yes! Thank you. I didn't realize I should hit the check mark to show this. – Paul O'Rorke Aug 10 '18 at 0:11

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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