Systemd by default breaks DNS name resolution by overriding /etc/resolv.conf to use its useless stub DNS server, and not the network managed one.
Symlink /run/systemd/resolve/resolv.conf to /etc/resolv.conf:
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
Sources:
-
Install libnss-winbind:
sudo apt-get install libnss-winbind
-
Enable NetBIOS name resolition by editing /etc/nsswitch.conf and changing the following line
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
and adding "wins" to the list after "dns":
hosts: files mdns4_minimal [NOTFOUND=return] dns wins mdns4
If you don't care about mDNS resolution (automatic network host name resolution for *.local similar to NetBIOS), then "mdns4_minimal [NOTFOUND=return]" and "mdns4" can be removed:
hosts: files dns wins
Source: How to enable Linux machines to resolve Windows hostnames