How to get the systemd resolver to resolve local (i.e. unqalified) names?
Xen
list at xenhideout.nl
Sun Jun 4 09:24:52 UTC 2017
Chris Green schreef op 04-06-2017 11:06:
> However what I actually want is for the 'as delivered' system (or at
> least one with as little modification as possible) to resolve
> unqualified names, like the old system used to.
I realize that but for me it is useful to know how to have some degree
of choice in what system will be used.
If systemd still uses /etc/resolv.conf, that is peculiar.
Then it uses unmodified libnss-dns.so and just becomes the forwarding
dns server.
Previously in an email it was said that systemd-resolved would use
nsswitch directly, and not use /etc/resolv.conf at all.
Therefore I assume that it *doesn't* use /etc/resolv.conf at all but
just messes with it, as was indicated.
Therefore you can assume that the /etc/resolv.conf is not actually used
by systemd-resolved and it actually did change the nsswitch.conf system,
but I don't know how.
There is no way normally to change the behaviour of getbyhostname unless
you modify either nsswitch itself or those libraries.
You can do:
getent hosts
to get the list of hosts found via nsswitch.conf, and "getent host
<name>" to resolve it.
This will show you what the nsswitch.conf system actually returns.
More information about the ubuntu-users
mailing list