]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/nss-mymachines.xml
man: revert dynamic paths for split-usr setups
[thirdparty/systemd.git] / man / nss-mymachines.xml
CommitLineData
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
61 (<command>glibc</command>) providing hostname resolution for
62 containers running locally, that are registered with
63 <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
64 The container names are resolved to IP addresses of the specific
65 container, ordered by their scope.</para>
66
67 <para>To activate the NSS modules, <literal>mymachines</literal>
68 has to be added to the line starting with
69 <literal>hosts:</literal> in
70 <filename>/etc/nsswitch.conf</filename>.</para>
71
72 <para>It is recommended to place <literal>mymachines</literal>
73 near the end of the <filename>nsswitch.conf</filename> line to
74 make sure that this mapping is only used as fallback, and any DNS
75 or <filename>/etc/hosts</filename> based mapping takes
76 precedence.</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>mymachines</command> correctly:</para>
84
85<programlisting>passwd: compat
86group: compat
87shadow: compat
88
89hosts: files dns <command>mymachines</command> myhostname
dbda6dce
LP
90networks: files
91
92protocols: db files
93services: db files
798d3a52
ZJS
94ethers: db files
95rpc: db files
dbda6dce
LP
96
97netgroup: nis</programlisting>
98
798d3a52
ZJS
99 </refsect1>
100
101 <refsect1>
102 <title>See Also</title>
103 <para>
104 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
105 <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
106 <citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
107 <citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
108 <citerefentry project='man-pages'><refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
109 </para>
110 </refsect1>
dbda6dce
LP
111
112</refentry>