How to get the systemd resolver to resolve local (i.e. unqalified) names?
Xen
list at xenhideout.nl
Sun Jun 4 12:17:49 UTC 2017
Chris Green schreef op 04-06-2017 13:10:
>> hosts: files dns
>>
>> does "getent ..." still work?
>>
> No, it simply returns nothing, no error. 'host esprimo' still returns
> SERVFAIL.
So this test reveals that getent used resolve and that dns was not
working because of the missing "search".
The only thing that's really peculiar is as I've said that getent would
work (using resolve) but "host" would not (also using resolve).
This means that if you change it to:
hosts: files resolve
It still would not work.
man 3 gethostbyname2
is the function that getent uses.
Oh, of course.
"host" does not use glibc. It does not use nsswitch.conf.
It uses /etc/resolv.conf directly, which subsequently fails.
So as the email indicated,
- systemd-resolved works through the glibc nsswitch system
- other utilities may use /etc/resolv.conf directly.
More information about the ubuntu-users
mailing list