The nsss library interface

General information

libnsss is a client library meant to be used by client programs needing utmp functionality. It interacts with various server-side daemons such as nsssd-unix.

Application programs can use it directly, but most existing programs simply use the standard pwd.h, grp.h or shadow.h interfaces, which in nsss are implemented as a series of thin wrappers around the nsss library.




The nsss/nsss.h header is actually a collection of headers:

By default, the getpwnam() et al. functions are aliased to their nsss-all implementations. You can disable the nsss-unix fallback by compiling with the NSSS_DISABLE_UNIX macro defined (-DNSSS_DISABLE_UNIX). Or you can disable any attempt to connect to a daemon by compiling with the NSSS_DISABLE_SWITCH macro defined (-DNSSS_DISABLE_SWITCH).

(To be completed.)