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