How to get the systemd resolver to resolve local (i.e. unqalified) names?
Xen
list at xenhideout.nl
Sun Jun 4 14:42:08 UTC 2017
Tom H schreef op 04-06-2017 16:19:
> I'd had to re-read the "resolv.conf" man page to be sure but, IIRC, if
> "/etc/resolv.conf" doesn't have a search or domain entry, the local
> system's domain is searched for short hostnames by default.
But if the upstream server doesn't search for it based on short names,
it is not supposed to work.
>>> So "host" fails with both "resolve" and "dns" (previously it was
>>> failing with "resolve" and returning).
>>
>> It doesn't use nsswitch.
>
> Thanks. True. It was a stupid test and comment :(
That doesn't matter ;-).
> ACK. In other words, querying resolved for a short hostname fails
> without the appropriate domain or search entry in "/etc/resolv.conf"
> in spite of resolved being configured with a "Domain=" directive. I
> wonder whether resolved can provide dig and co domain information
> without populating "/etc/resolv.conf with that information.
Yes, because it conforms to existing standards.
And because Linux has always had a kind of split system, where some
tools would use nsswitch, and other tools would use /etc/resolv.conf,
but nsswitch also uses /etc/resolv.conf (when configured for it),
but it can also use more and systemd now makes use of that.
More information about the ubuntu-users
mailing list