systemd/man/nss-mymachines.html
2015-02-17 11:22:16 +01:00

56 lines
4.0 KiB
HTML

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>nss-mymachines</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
visibility: visible;
}
</style><a href="index.html">Index </a>·
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="nss-mymachines"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>nss-mymachines, libnss_mymachines.so.2 — Provide hostname resolution for local
container instances.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">libnss_mymachines.so.2</code></p></div><div class="refsect1"><a name="idm140087977504304"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>nss-mymachines</strong></span> is a plugin for the GNU
Name Service Switch (NSS) functionality of the GNU C Library
(<span class="command"><strong>glibc</strong></span>) providing hostname resolution for
containers running locally, that are registered with
<a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>.
The container names are resolved to IP addresses of the specific
container, ordered by their scope.</p><p>To activate the NSS modules, "<code class="literal">mymachines</code>"
has to be added to the line starting with
"<code class="literal">hosts:</code>" in
<code class="filename">/etc/nsswitch.conf</code>.</p><p>It is recommended to place "<code class="literal">mymachines</code>"
near the end of the <code class="filename">nsswitch.conf</code> line to
make sure that this mapping is only used as fallback, and any DNS
or <code class="filename">/etc/hosts</code> based mapping takes
precedence.</p></div><div class="refsect1"><a name="idm140087977495696"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example"></a></h2><p>Here's an example <code class="filename">/etc/nsswitch.conf</code>
file, that enables <span class="command"><strong>mymachines</strong></span> correctly:</p><pre class="programlisting">passwd: compat
group: compat
shadow: compat
hosts: files dns <span class="command"><strong>mymachines</strong></span> myhostname
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis</pre></div><div class="refsect1"><a name="idm140087977491520"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd-machined.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined.service</span>(8)</span></a>,
<a href="nss-myhostname.html"><span class="citerefentry"><span class="refentrytitle">nss-myhostname</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man5/nsswitch.conf.5.html"><span class="citerefentry"><span class="refentrytitle">nsswitch.conf</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man1/getent.1.html"><span class="citerefentry"><span class="refentrytitle">getent</span>(1)</span></a>
</p></div></div></body></html>