nss-mymachines
systemd
Developer
Lennart
Poettering
lennart@poettering.net
nss-mymachines
8
nss-mymachines
libnss_mymachines.so.2
Provide hostname resolution for local
container instances.
libnss_mymachines.so.2
Description
nss-mymachines is a plugin for the GNU
Name Service Switch (NSS) functionality of the GNU C Library
(glibc), providing hostname resolution for
container names of containers running locally that are registered
with
systemd-machined.service8.
The container names are resolved to the IP addresses of the
specific container, ordered by their scope.
The module also resolves user IDs used by containers to user
names indicating the container name, and back.
To activate the NSS modules, mymachines
has to be added to the lines starting with
hosts:, passwd: and
group: in
/etc/nsswitch.conf.
It is recommended to place mymachines
near the end of the nsswitch.conf lines to
make sure that its mappings are only used as fallback, and any
other mappings, such as DNS or /etc/hosts
based mappings, take precedence.
Example
Here's an example /etc/nsswitch.conf
file that enables mymachines correctly:
passwd: compat mymachines
group: compat mymachines
shadow: compat
hosts: files resolve mymachines myhostname
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
See Also
systemd1,
systemd-machined.service8,
nss-resolve8,
nss-myhostname8,
nsswitch.conf5,
getent1