3 ms·
The article mentions `nss_systemd`. NSS allows Linux systems to provide custom ways to look up users and groups. https://en.m.wikipedia.org/wiki/Name_Service_
by mikelward 3y ago
The article mentions `nss_systemd`.
NSS allows Linux systems to provide custom ways to look up users and groups.
https://en.m.wikipedia.org/wiki/Name_Service_Switch https://en.m.wikipedia.org/wiki/Name_Service_Switch
https://www.man7.org/linux/man-pages/man5/nsswitch.conf.5.html https://www.man7.org/linux/man-pages/man5/nsswitch.conf.5.ht... says this is implemented by having a shared object library for each "service".
https://www.freedesktop.org/software/systemd/man/nss-systemd.html https://www.freedesktop.org/software/systemd/man/nss-systemd... says `nss_systemd` is mainly for systemd's DynamicUser feature.
https://www.freedesktop.org/software/systemd/man/systemd.exec.html# https://www.freedesktop.org/software/systemd/man/systemd.exe... documents that setting:
> DynamicUser=
> Takes a boolean parameter. If set, a UNIX user and group pair is allocated dynamically when the unit is started, and released as soon as it is stopped. The user and group will not be added to /etc/passwd or /etc/group, but are managed transiently during runtime
https://www.redhat.com/sysadmin/systemd-secure-services https://www.redhat.com/sysadmin/systemd-secure-services explains that this is for sandboxing.
- mikelward 3y agoThe glibc docs explain nsswitch well. https://www.gnu.org/software/libc/manual/html_node/Name-Service-Switch.html https://www.gnu.org/software/libc/manual/html_node/Name-Serv... https://www.gnu.org/software/libc/manual/html_node/Adding-another-Service-to-NSS.html https://www.gnu.org/software/libc/manual/html_node/Adding-an... in particular, which explains how to write a custom NSS service as a shared library. I expect the concern the article raises applies to all custom NSS services, such as: - sssd: https://ubuntu.com/server/docs/service-sssd-ad https://ubuntu.com/server/docs/service-sssd-ad - nsscache: https://github.com/google/nsscache https://github.com/google/nsscache