]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/nss-mymachines.xml
tmpfiles: fix compilation without acl support
[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"
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
60 for the GNU Name Service Switch (NSS) functionality of
61 the GNU C Library (<command>glibc</command>) providing
62 hostname resolution for containers running locally,
63 that are registered with
64 <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
65 container names are resolved to IP addresses of the
66 specific container, ordered by their scope.</para>
67
68 <para>To activate the NSS modules,
69 <literal>mymachines</literal> has to be added to the
70 line starting with <literal>hosts:</literal> in
71 <filename>/etc/nsswitch.conf</filename>.</para>
72
73 <para>It is recommended to place
74 <literal>mymachines</literal> near the end of the
75 <filename>nsswitch.conf</filename> line to make sure
76 that this mapping is only used as fallback, and any
77 DNS or <filename>/etc/hosts</filename> based mapping
78 takes precedence.</para>
79 </refsect1>
80
81 <refsect1>
82 <title>Example</title>
83
84 <para>Here's an example
85 <filename>/etc/nsswitch.conf</filename> file, that
86 enables <command>mymachines</command>
87 correctly:</para>
88
89<programlisting>passwd: compat
90group: compat
91shadow: compat
92
93hosts: files dns <command>mymachines</command> myhostname
94networks: files
95
96protocols: db files
97services: db files
98ethers: db files
99rpc: db files
100
101netgroup: nis</programlisting>
102
103 </refsect1>
104
105 <refsect1>
106 <title>See Also</title>
107 <para>
108 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
109 <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
110 <citerefentry><refentrytitle>nss-myhostname</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
111 <citerefentry project='man-pages'><refentrytitle>nsswitch.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
112 <citerefentry project='man-pages'><refentrytitle>getent</refentrytitle><manvolnum>1</manvolnum></citerefentry>
113 </para>
114 </refsect1>
115
116</refentry>