]>
Commit | Line | Data |
---|---|---|
dbda6dce LP |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
681eb9cf FB |
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ |
4 | <!ENTITY % entities SYSTEM "custom-entities.ent" > | |
5 | %entities; | |
6 | ]> | |
dbda6dce LP |
7 | |
8 | <!-- | |
9 | This file is part of systemd. | |
10 | ||
11 | Copyright 2014 Lennart Poettering | |
12 | ||
13 | systemd is free software; you can redistribute it and/or modify it | |
14 | under the terms of the GNU Lesser General Public License as published by | |
15 | the Free Software Foundation; either version 2.1 of the License, or | |
16 | (at your option) any later version. | |
17 | ||
18 | systemd is distributed in the hope that it will be useful, but | |
19 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
21 | Lesser General Public License for more details. | |
22 | ||
23 | You should have received a copy of the GNU Lesser General Public License | |
24 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
25 | --> | |
26 | ||
27 | <refentry id="nss-mymachines" conditional='ENABLE_MACHINED'> | |
28 | ||
798d3a52 ZJS |
29 | <refentryinfo> |
30 | <title>nss-mymachines</title> | |
31 | <productname>systemd</productname> | |
32 | ||
33 | <authorgroup> | |
34 | <author> | |
35 | <contrib>Developer</contrib> | |
36 | <firstname>Lennart</firstname> | |
37 | <surname>Poettering</surname> | |
38 | <email>lennart@poettering.net</email> | |
39 | </author> | |
40 | </authorgroup> | |
41 | </refentryinfo> | |
42 | ||
43 | <refmeta> | |
44 | <refentrytitle>nss-mymachines</refentrytitle> | |
45 | <manvolnum>8</manvolnum> | |
46 | </refmeta> | |
47 | ||
48 | <refnamediv> | |
49 | <refname>nss-mymachines</refname> | |
50 | <refname>libnss_mymachines.so.2</refname> | |
51 | <refpurpose>Provide hostname resolution for local | |
52 | container instances.</refpurpose> | |
53 | </refnamediv> | |
54 | ||
55 | <refsynopsisdiv> | |
56 | <para><filename>libnss_mymachines.so.2</filename></para> | |
57 | </refsynopsisdiv> | |
58 | ||
59 | <refsect1> | |
60 | <title>Description</title> | |
61 | ||
62 | <para><command>nss-mymachines</command> is a plugin for the GNU | |
63 | Name Service Switch (NSS) functionality of the GNU C Library | |
64 | (<command>glibc</command>) providing hostname resolution for | |
65 | containers running locally, that are registered with | |
66 | <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. | |
67 | The container names are resolved to IP addresses of the specific | |
68 | container, ordered by their scope.</para> | |
69 | ||
70 | <para>To activate the NSS modules, <literal>mymachines</literal> | |
71 | has to be added to the line starting with | |
72 | <literal>hosts:</literal> in | |
73 | <filename>/etc/nsswitch.conf</filename>.</para> | |
74 | ||
75 | <para>It is recommended to place <literal>mymachines</literal> | |
76 | near the end of the <filename>nsswitch.conf</filename> line to | |
77 | make sure that this mapping is only used as fallback, and any DNS | |
78 | or <filename>/etc/hosts</filename> based mapping takes | |
79 | precedence.</para> | |
80 | </refsect1> | |
81 | ||
82 | <refsect1> | |
83 | <title>Example</title> | |
84 | ||
85 | <para>Here's an example <filename>/etc/nsswitch.conf</filename> | |
86 | file, that enables <command>mymachines</command> correctly:</para> | |
87 | ||
88 | <programlisting>passwd: compat | |
89 | group: compat | |
90 | shadow: compat | |
91 | ||
92 | hosts: files dns <command>mymachines</command> myhostname | |
dbda6dce LP |
93 | networks: files |
94 | ||
95 | protocols: db files | |
96 | services: db files | |
798d3a52 ZJS |
97 | ethers: db files |
98 | rpc: db files | |
dbda6dce LP |
99 | |
100 | netgroup: nis</programlisting> | |
101 | ||
798d3a52 ZJS |
102 | </refsect1> |
103 | ||
104 | <refsect1> | |
105 | <title>See Also</title> | |
106 | <para> | |
107 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
108 | <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
109 | <citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
110 | <citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>, | |
111 | <citerefentry project='man-pages'><refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
112 | </para> | |
113 | </refsect1> | |
dbda6dce LP |
114 | |
115 | </refentry> |