diff --git a/man/nss-myhostname.xml b/man/nss-myhostname.xml index 251bdecbad1..f8837745ae6 100644 --- a/man/nss-myhostname.xml +++ b/man/nss-myhostname.xml @@ -57,12 +57,11 @@ Description - nss-myhostname is a plugin for the GNU - Name Service Switch (NSS) functionality of the GNU C Library - (glibc), primarily providing hostname resolution - for the locally configured system hostname as returned by - gethostname2. - The precise hostnames resolved by this module are: + nss-myhostname is a plug-in module for the GNU Name Service Switch (NSS) functionality of + the GNU C Library (glibc), primarily providing hostname resolution for the locally configured + system hostname as returned by + gethostname2. The precise + hostnames resolved by this module are: The local, configured hostname is resolved to @@ -80,7 +79,6 @@ ordered by their metric. This assigns a stable hostname to the current gateway, useful for referencing it independently of the current network configuration state. - Various software relies on an always-resolvable local @@ -93,29 +91,25 @@ changing /etc/hosts is unnecessary, and on many systems, the file becomes entirely optional. - To activate the NSS modules, myhostname - has to be added to the line starting with - hosts: in - /etc/nsswitch.conf. + To activate the NSS modules, add myhostname to the line starting with + hosts: in /etc/nsswitch.conf. - It is recommended to place myhostname - last in the nsswitch.conf line to make sure - that this mapping is only used as fallback, and that any DNS or - /etc/hosts based mapping takes - precedence. + It is recommended to place myhostname last in the nsswitch.conf' + hosts: line to make sure that this mapping is only used as fallback, and that any DNS or + /etc/hosts based mapping takes precedence. Example - Here is an example /etc/nsswitch.conf - file that enables myhostname correctly: + Here is an example /etc/nsswitch.conf file that enables + nss-myhostname correctly: passwd: compat mymachines group: compat mymachines shadow: compat -hosts: files resolve mymachines myhostname +hosts: files mymachines resolve myhostname networks: files protocols: db files diff --git a/man/nss-mymachines.xml b/man/nss-mymachines.xml index d2bec763bb6..ec047449bf9 100644 --- a/man/nss-mymachines.xml +++ b/man/nss-mymachines.xml @@ -56,42 +56,37 @@ 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. + nss-mymachines is a plug-in module for the GNU Name Service Switch (NSS) functionality of + the GNU C Library (glibc), providing hostname resolution for the 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. This + functionality only applies to containers using network namespacing. - The module also resolves user IDs used by containers to user - names indicating the container name, and back. + The module also resolves user and group IDs used by containers to user and group names indicating the + container name, and back. This functionality only applies to containers using user namespacing. - To activate the NSS modules, mymachines - has to be added to the lines starting with - hosts:, passwd: and - group: in + To activate the NSS module, add mymachines 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 that any - other mappings, such as DNS or /etc/hosts - based mappings, take precedence. + It is recommended to place mymachines after the files or + compat entry of the /etc/nsswitch.conf lines to make sure that its mappings + are preferred over other resolvers such as DNS, but so that /etc/hosts, + /etc/passwd and /etc/group based mappings take precedence. Example - Here is an example /etc/nsswitch.conf - file that enables mymachines correctly: + Here is an example /etc/nsswitch.conf file that enables + nss-mymachines correctly: passwd: compat mymachines group: compat mymachines shadow: compat -hosts: files resolve mymachines myhostname +hosts: files mymachines resolve myhostname networks: files protocols: db files diff --git a/man/nss-resolve.xml b/man/nss-resolve.xml index 8b0928145f0..d9e56453e8e 100644 --- a/man/nss-resolve.xml +++ b/man/nss-resolve.xml @@ -56,37 +56,36 @@ Description - nss-resolve is a plugin module for the - GNU Name Service Switch (NSS) functionality of the GNU C Library - (glibc) enabling it to resolve host names via - the - systemd-resolved8 - local network name resolution service. + nss-resolve is a plug-in module for the GNU Name Service Switch (NSS) functionality of the + GNU C Library (glibc) enabling it to resolve host names via the + systemd-resolved8 local network + name resolution service. It replaces the nss-dns plug-in module that traditionally resolves + hostnames via DNS. - To activate the NSS module, resolve - has to be added to the line starting with - hosts: in - /etc/nsswitch.conf. + To activate the NSS module, add resolve to the line starting with + hosts: in /etc/nsswitch.conf. - It is recommended to place resolve early - in the nsswitch.conf line (but after the - files entry), replacing the - dns entry if it exists, to ensure DNS queries - are always routed via + It is recommended to place resolve early in /etc/nsswitch.conf' + hosts: line (but after the files or mymachines entries), + replacing the dns entry if it exists, to ensure DNS queries are always routed via systemd-resolved8. + + Note that nss-resolve will chain-load nss-dns if + systemd-resolved.service is not running, ensuring that basic DNS resolution continues to work + if the service is down. Example - Here is an example /etc/nsswitch.conf - file that enables resolve correctly: + Here is an example /etc/nsswitch.conf file that enables nss-resolve + correctly: passwd: compat mymachines group: compat mymachines shadow: compat -hosts: files resolve mymachines myhostname +hosts: files mymachines resolve myhostname networks: files protocols: db files @@ -96,12 +95,6 @@ rpc: db files netgroup: nis - Note that nss-resolve will chain-load - nss-dns if - systemd-resolved.service is not running, - ensuring that basic DNS resolution continues to work if the - service is down. -