]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/nss-mymachines.xml
doc: correct orthography, word forms and missing/extraneous words
[thirdparty/systemd.git] / man / nss-mymachines.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
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 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
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
61 (<command>glibc</command>), providing hostname resolution for
62 container names of containers running locally that are registered
63 with
64 <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
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>
70
71 <para>To activate the NSS modules, <literal>mymachines</literal>
72 has to be added to the lines starting with
73 <literal>hosts:</literal>, <literal>passwd:</literal> and
74 <literal>group:</literal> in
75 <filename>/etc/nsswitch.conf</filename>.</para>
76
77 <para>It is recommended to place <literal>mymachines</literal>
78 near the end of the <filename>nsswitch.conf</filename> lines to
79 make sure that its mappings are only used as fallback, and that any
80 other mappings, such as DNS or <filename>/etc/hosts</filename>
81 based mappings, take precedence.</para>
82 </refsect1>
83
84 <refsect1>
85 <title>Example</title>
86
87 <para>Here's an example <filename>/etc/nsswitch.conf</filename>
88 file that enables <command>mymachines</command> correctly:</para>
89
90 <programlisting>passwd: compat <command>mymachines</command>
91 group: compat <command>mymachines</command>
92 shadow: compat
93
94 hosts: files resolve <command>mymachines</command> myhostname
95 networks: files
96
97 protocols: db files
98 services: db files
99 ethers: db files
100 rpc: db files
101
102 netgroup: nis</programlisting>
103
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>,
111 <citerefentry><refentrytitle>nss-resolve</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
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>
117
118 </refentry>