-
-
Notifications
You must be signed in to change notification settings - Fork 2
nssd.8
/usr/sbin/nssd - NSS daemon for IndiMail
nssd [-f config] [ -d level] | [-V]
There are various functions to lookup users and groups in a local environment. Traditionally, this is done by using files (e.g., /etc/passwd, /etc/hosts, etc), but other nameservices (like the Network Information Service (NIS) and the Domain Name Service (DNS)) are popular, and have been hacked into the C library, usually with a fixed search order. The Name Service Switch (NSS) provides a cleaner solution to extend the lookup to other databases. In Unix-like operating systems, the Name Service Switch (NSS) allows Unix configuration databases to be provided by different sources, including local files (for example: /etc/passwd, /etc/shadow, /etc/group, /etc/hosts), LDAP, and other sources.
nssd(8) provides caching for accesses of the passwd(5), group(5), databases through standard libc interfaces, such as getpwnam(3), getpwuid(3), getgrnam(3), getgrgid(3).
nssd(8) provides any MySQL database as an alternate Unix configuration database for the passwd(5), shadow(5) and group(5) databases through standard libc interfaces, such as getpwnam(3), getpwuid(3), getpwent(3), getspnam(3), getspent(3), getgrnam(3), getgrgid(3), getgrent(3). These functions are implemented as a shared library in libnss_nssd.so in your system lib directory (/usr/lib64 or /usr/lib). The actual implementation of nssd is implemented by having nssd listening on a UNIX domain socket /run/indimail/pwdlookup/nssd.sock and the libnss_nssd.so library. With some minimal configuration in /etc/nsswitch.conf, these functions mentioned above will connect to the nssd daemon to lookup users and groups. nssd will provide the result back from the configured MySQL database. One can use any MySQL database by modifying the relevant SQL query string in the nssd configuration file /etc/indimail/nssd.conf.
To enable the nssd library, the following entries should be made in /etc/nsswitch.conf
passwd:
files nssd
shadow:
files nssd
group:
files nssd
nssd uses syslog(3) to log all messages. You can improve the NSS performance by starting nscd(8) name service cache daemon.
nssd uses /run/indimail/pwdlookup/nssd.sock as a default. This can be changed by setting NSSD_SOCKET environment variable.
-V
Display Version Numbers
-f config
nssd config file path
-d level
Set debug level. Higher the level, more the verbosity of messages which
get logged. Set level to debug to log everything. Set level to
alert to log all alert messags and above. level determines the
importance of the message. The levels are, in order of decreasing
importance:
Level Description
----------- ------------------------------------
LOG_EMERG | system is unusable
LOG_ALERT | action must be taken immediately
LOG_CRIT | critical conditions
LOG_ERR | error conditions
LOG_WARNING | warning conditions
LOG_NOTICE | normal, but significant, condition
LOG_INFO | informational message
LOG_DEBUG | debug-level message
IndiMail(7) nssd.conf(5), nscd(8) nscd(5) nsswitch.conf(5) getpwnam(3) getpwuid(3) getpwent(3) getspnam(3) getspent(3) getgrnam(3) getgrgid(3) getgrent(3)