]>
Commit | Line | Data |
---|---|---|
0d6868f9 LP |
1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | |
4 | ||
5 | <!-- | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2011 Lennart Poettering | |
9 | Copyright 2013 Tom Gundersen | |
10 | ||
11 | systemd is free software; you can redistribute it and/or modify it | |
12 | under the terms of the GNU Lesser General Public License as published by | |
13 | the Free Software Foundation; either version 2.1 of the License, or | |
14 | (at your option) any later version. | |
15 | ||
16 | systemd is distributed in the hope that it will be useful, but | |
17 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 | Lesser General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU Lesser General Public License | |
22 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
23 | --> | |
24 | ||
25 | <refentry id="nss-resolve" conditional='ENABLE_RESOLVED'> | |
26 | ||
27 | <refentryinfo> | |
28 | <title>nss-resolve</title> | |
29 | <productname>systemd</productname> | |
30 | ||
31 | <authorgroup> | |
32 | <author> | |
33 | <contrib>Developer</contrib> | |
34 | <firstname>Lennart</firstname> | |
35 | <surname>Poettering</surname> | |
36 | <email>lennart@poettering.net</email> | |
37 | </author> | |
38 | </authorgroup> | |
39 | </refentryinfo> | |
40 | ||
41 | <refmeta> | |
42 | <refentrytitle>nss-resolve</refentrytitle> | |
43 | <manvolnum>8</manvolnum> | |
44 | </refmeta> | |
45 | ||
46 | <refnamediv> | |
47 | <refname>nss-resolve</refname> | |
48 | <refname>libnss_resolve.so.2</refname> | |
49 | <refpurpose>Provide hostname resolution via <filename>systemd-resolved.service</filename></refpurpose> | |
50 | </refnamediv> | |
51 | ||
52 | <refsynopsisdiv> | |
53 | <para><filename>libnss_resolve.so.2</filename></para> | |
54 | </refsynopsisdiv> | |
55 | ||
56 | <refsect1> | |
57 | <title>Description</title> | |
58 | ||
59 | <para><command>nss-resolve</command> is a plugin module for the | |
60 | GNU Name Service Switch (NSS) functionality of the GNU C Library | |
61 | (<command>glibc</command>) enabling it to resolve host names via | |
62 | the | |
63 | <citerefentry><refentrytitle>systemd-resolved</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
64 | local network name resolution service.</para> | |
65 | ||
66 | <para>To activate the NSS module, <literal>resolve</literal> | |
67 | has to be added to the line starting with | |
68 | <literal>hosts:</literal> in | |
69 | <filename>/etc/nsswitch.conf</filename>.</para> | |
70 | ||
71 | <para>It is recommended to place <literal>resolve</literal> early | |
72 | in the <filename>nsswitch.conf</filename> line (but after the | |
73 | <literal>files</literal> entry), replacing the | |
74 | <literal>dns</literal> entry if it exists, to ensure DNS queries | |
75 | are always routed via | |
76 | <citerefentry><refentrytitle>systemd-resolved</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para> | |
77 | </refsect1> | |
78 | ||
79 | <refsect1> | |
80 | <title>Example</title> | |
81 | ||
82 | <para>Here's an example <filename>/etc/nsswitch.conf</filename> | |
83 | file, that enables <command>resolve</command> correctly:</para> | |
84 | ||
a8ba86ce LP |
85 | <programlisting>passwd: compat mymachines |
86 | group: compat mymachines | |
0d6868f9 LP |
87 | shadow: compat |
88 | ||
89 | hosts: files <command>resolve</command> mymachines myhostname | |
90 | networks: files | |
91 | ||
92 | protocols: db files | |
93 | services: db files | |
94 | ethers: db files | |
95 | rpc: db files | |
96 | ||
97 | netgroup: nis</programlisting> | |
98 | ||
99 | <para>Note that <command>nss-resolve</command> will chain-load | |
100 | <command>nss-dns</command> if | |
101 | <filename>systemd-resolved.service</filename> is not running, | |
102 | ensuring that basic DNS resolution continues to work if the | |
103 | service is down.</para> | |
104 | ||
105 | </refsect1> | |
106 | ||
107 | <refsect1> | |
108 | <title>See Also</title> | |
109 | <para> | |
110 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
111 | <citerefentry><refentrytitle>systemd-resolved</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
112 | <citerefentry><refentrytitle>nss-mymachines</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
113 | <citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
114 | <citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
115 | </para> | |
116 | </refsect1> | |
117 | ||
118 | </refentry> |