NAME | SYNOPSIS | DESCRIPTION | EXAMPLE | SEE ALSO | COLOPHON

NSS-RESOLVE(8)                   nss-resolve                  NSS-RESOLVE(8)

NAME         top

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

SYNOPSIS         top

       libnss_resolve.so.2

DESCRIPTION         top

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

EXAMPLE         top

       Here is an example /etc/nsswitch.conf file that enables nss-resolve
       correctly:
           passwd:         compat mymachines systemd
           group:          compat mymachines systemd
           shadow:         compat
           hosts:          files mymachines resolve [!UNAVAIL=return] dns myhostname
           networks:       files
           protocols:      db files
           services:       db files
           ethers:         db files
           rpc:            db files
           netgroup:       nis

SEE ALSO         top

       systemd(1), systemd-resolved(8), nss-systemd(8), nss-myhostname(8),
       nss-mymachines(8), nsswitch.conf(5)

COLOPHON         top

       This page is part of the systemd (systemd system and service manager)
       project.  Information about the project can be found at 
       ⟨http://www.freedesktop.org/wiki/Software/systemd⟩.  If you have a bug
       report for this manual page, see 
       ⟨http://www.freedesktop.org/wiki/Software/systemd/#bugreports⟩.  This
       page was obtained from the project's upstream Git repository 
       ⟨https://github.com/systemd/systemd.git⟩ on 2017-07-05.  If you dis‐
       cover any rendering problems in this HTML version of the page, or you
       believe there is a better or more up-to-date source for the page, or
       you have corrections or improvements to the information in this
       COLOPHON (which is not part of the original manual page), send a mail
       to man-pages@man7.org
systemd 234                                                   NSS-RESOLVE(8)

Pages that refer to this page: systemd.directives(7)systemd.index(7)nss-myhostname(8)nss-mymachines(8)nss-systemd(8)systemd-resolved.service(8)