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

83 lines
2.3 KiB
Groff

'\" t
.TH "NSS\-MYMACHINES" "8" "" "systemd 219" "nss-mymachines"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
nss-mymachines, libnss_mymachines.so.2 \- Provide hostname resolution for local container instances\&.
.SH "SYNOPSIS"
.PP
libnss_mymachines\&.so\&.2
.SH "DESCRIPTION"
.PP
\fBnss\-mymachines\fR
is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (\fBglibc\fR) providing hostname resolution for containers running locally, that are registered with
\fBsystemd-machined.service\fR(8)\&. The container names are resolved to IP addresses of the specific container, ordered by their scope\&.
.PP
To activate the NSS modules,
"mymachines"
has to be added to the line starting with
"hosts:"
in
/etc/nsswitch\&.conf\&.
.PP
It is recommended to place
"mymachines"
near the end of the
nsswitch\&.conf
line to make sure that this mapping is only used as fallback, and any DNS or
/etc/hosts
based mapping takes precedence\&.
.SH "EXAMPLE"
.PP
Here\*(Aqs an example
/etc/nsswitch\&.conf
file, that enables
\fBmymachines\fR
correctly:
.sp
.if n \{\
.RS 4
.\}
.nf
passwd: compat
group: compat
shadow: compat
hosts: files dns \fBmymachines\fR myhostname
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsystemd-machined.service\fR(8),
\fBnss-myhostname\fR(8),
\fBnsswitch.conf\fR(5),
\fBgetent\fR(1)