summaryrefslogtreecommitdiff
path: root/man/nss-mymachines.8
blob: 39d27b65567dbdc32d9420ef7288e990ba37253b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
'\" t
.TH "NSS\-MYMACHINES" "8" "" "systemd 221" "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)