How to get the systemd resolver to resolve local (i.e. unqalified) names?
Chris Green
cl at isbd.net
Sun Jun 4 09:38:51 UTC 2017
On Sun, Jun 04, 2017 at 11:24:52AM +0200, Xen wrote:
>
> 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
>
This returns:-
root at t470:/etc/systemd# getent hosts
127.0.0.1 localhost
127.0.1.1 t470
127.0.0.1 ip6-localhost ip6-loopback
> to get the list of hosts found via nsswitch.conf, and "getent host <name>"
> to resolve it.
>
... and this:-
root at t470:/etc/systemd# getent hosts esprimo
192.168.1.3 esprimo.zbmc.eu
I.e. using getent works as I want! However:-
root at t470:/etc/systemd# host esprimo
Host esprimo not found: 2(SERVFAIL)
It would seem than anything that *doesn't* use the /etc/resolv.conf
configuration set up by systemd works OK but anything that goes to
127.0.0.53 fails with SERVFAIL.
--
Chris Green
More information about the ubuntu-users
mailing list