How to get the systemd resolver to resolve local (i.e. unqalified) names?

Tom H tomh0665 at gmail.com
Sun Jun 4 10:38:33 UTC 2017


On Sun, Jun 4, 2017 at 5:31 AM, Xen <list at xenhideout.nl> wrote:
> Tom H schreef op 04-06-2017 11:27:
>> On Sat, Jun 3, 2017 at 11:34 AM, Xen <list at xenhideout.nl> wrote:
>>>
>>> Note that the systemd system works by changing /etc/nsswitch.conf, I
>>> believe. On a typical Debian 8 host this file would look like this:
>>>
>>> hosts: files mdns4_minimal [NOTFOUND=return] dns
>>>
>>> for the hosts line. I don't know what it does with you.
>>
>> If you're using resolved, you can add "resolve" (before "dns") to the
>> "hosts" line. "libnss_resolve" will then be used to query resolved
>> directly.
>
> So you're basically saying that without it nss will use libnss-dns and
> /etc/resolv.conf will be used and therefore the missing search parameter is
> a problem?

Independently of Chris' problem, I was pointing out that you could use
resolved as a dns server by using "libnss_resolve".

You also don't need any mdns entry on the "hosts" line when you're
querying resolved, whether with "libnss_resolve" or "libnss_dns".




More information about the ubuntu-users mailing list