1NSS-RESOLVE(8)                    nss-resolve                   NSS-RESOLVE(8)
2
3
4

NAME

6       nss-resolve, libnss_resolve.so.2 - Provide hostname resolution via
7       systemd-resolved.service
8

SYNOPSIS

10       libnss_resolve.so.2
11

DESCRIPTION

13       nss-resolve is a plug-in module for the GNU Name Service Switch (NSS)
14       functionality of the GNU C Library (glibc) enabling it to resolve host
15       names via the systemd-resolved(8) local network name resolution
16       service. It replaces the nss-dns plug-in module that traditionally
17       resolves hostnames via DNS.
18
19       To activate the NSS module, add "resolve" to the line starting with
20       "hosts:" in /etc/nsswitch.conf. Specifically, it is recommended to
21       place "resolve" early in /etc/nsswitch.conf's "hosts:" line (but after
22       the "files" or "mymachines" entries), right before the "dns" entry if
23       it exists, followed by "[!UNAVAIL=return]", to ensure DNS queries are
24       always routed via systemd-resolved(8) if it is running, but are routed
25       to nss-dns if this service is not available.
26
27       Note that systemd-resolved will synthesize DNS resource records in a
28       few cases, for example for "localhost" and the current hostname, see
29       systemd-resolved(8) for the full list. This duplicates the
30       functionality of nss-myhostname(8), but it is still recommended (see
31       examples below) to keep nss-myhostname configured in
32       /etc/nsswitch.conf, to keep those names resolveable if systemd-resolved
33       is not running.
34

EXAMPLE

36       Here is an example /etc/nsswitch.conf file that enables nss-resolve
37       correctly:
38
39           passwd:         compat mymachines systemd
40           group:          compat mymachines systemd
41           shadow:         compat
42
43           hosts:          files mymachines resolve [!UNAVAIL=return] dns myhostname
44           networks:       files
45
46           protocols:      db files
47           services:       db files
48           ethers:         db files
49           rpc:            db files
50
51           netgroup:       nis
52

SEE ALSO

54       systemd(1), systemd-resolved(8), nss-systemd(8), nss-myhostname(8),
55       nss-mymachines(8), nsswitch.conf(5)
56
57
58
59systemd 239                                                     NSS-RESOLVE(8)
Impressum