nss-systemd
systemd
nss-systemd
8
nss-systemd
libnss_systemd.so.2
Provide UNIX user and group name resolution for user/group lookup via Varlink
libnss_systemd.so.2
Description
nss-systemd is a plug-in module for the GNU Name Service Switch (NSS)
functionality of the GNU C Library (glibc), providing UNIX user and group name
resolution for services implementing the User/Group Record
Lookup API via Varlink, such as the system and service manager
systemd1 (for its
DynamicUser= feature, see
systemd.exec5 for
details) or
systemd-homed.service8.
This module also ensures that the root and nobody users and groups (i.e. the users/groups with the UIDs/GIDs
0 and 65534) remain resolvable at all times, even if they aren't listed in /etc/passwd or
/etc/group, or if these files are missing.
This module preferably utilizes
systemd-userdbd.service8
for resolving users and groups, but also works without the service running.
To activate the NSS module, add systemd to the lines starting with
passwd: and group: in /etc/nsswitch.conf.
It is recommended to place systemd after the files or
compat entry of the /etc/nsswitch.conf lines so that
/etc/passwd and /etc/group based mappings take precedence.
Example
Here is an example /etc/nsswitch.conf file that enables
nss-systemd correctly:
passwd: compat mymachines systemd
group: compat [SUCCESS=merge] mymachines [SUCCESS=merge] systemd
shadow: compat
hosts: mymachines resolve [!UNAVAIL=return] myhostname files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
See Also
systemd1,
systemd.exec5,
nss-resolve8,
nss-myhostname8,
nss-mymachines8,
nsswitch.conf5,
getent1