-
-
Notifications
You must be signed in to change notification settings - Fork 3
nssd.conf.5
/etc/indimail/nssd.conf - NSS database configuration for nssd
nssd.conf specifies the query to be executed against a MySQL database for the functions getpwnam(3), getpwuid(3), getpwent(3), getspnam(3), getspent(3), getgrnam(3), getgrgid(3), getgrent(3).
To connect to MySQL you require the following paramters
host
MySQL host to connect
database
MySQL database to connect
username
The username to use for connecting to MySQL database
password
The password to use for the given username
socket or port
Socket or port to use for connecting to MySQL database
pidfile
Filename to store nssd(8) pid.
threads
No of nssd threads to run
timeout
Timeout to use for querying IndiMail's database. -1 for no timeout.
facility
syslog facility to use for log messages. The facility argument is used
to specify what type of program is logging the message. This lets the
configuration file specify that messages from different facilities will
be handled differently.
Level Description ----------- ------------------------------------ kern kernel messages user random user-level messages mail mail system daemon system daemons auth security/authorization messages syslog messages generated internally by syslogd lpr line printer subsystem news network news subsystem uucp UUCP subsystem cron clock daemon authpriv security/authorization messages (private) ftp ftp daemon local0 to local7 reserved for local use
priority
syslog priority to use for log messages. Higher the priority, more the
verbosity of messages which gets logged. Set priority to debug to
log everything. Set priority to alert to log all alert messags and
above. priority determines the importance of the message. The
priorities 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
The example below shows a configuration file /etc/indimail/nssd.conf
getpwnam SELECT pw_name,'x',555,555,pw_gecos,pw_dir,pw_shell \
FROM indimail \
WHERE pw_name='%1$s' and pw_domain='%2$s' \
LIMIT 1
LIMIT 1
getpwuid SELECT username,'x',uid,gid,gecos,homedir,shell \
FROM users \
WHERE uid='%1$s' \
LIMIT 1
getpwent SELECT pw_name,'x',555,555,pw_gecos,pw_dir,pw_shell \
FROM indimail
getspnam SELECT pw_name,pw_passwd,'1','0','99999','0','0','-1','0' \
FROM indimail \
WHERE pw_name='%1$s'and pw_domain='%2$s' \
LIMIT 1
getspent SELECT pw_name,pw_passwd,'1','0','99999','0','0','-1','0' \
FROM indimail
getgrnam SELECT name, password, gid \
FROM groups \
WHERE name='%1$s' \
LIMIT 1
getgrgid SELECT name, password, gid \
FROM groups \
WHERE gid='%1$s' \
LIMIT 1
getgrent SELECT name, password, gid FROM groups
memsbygid SELECT username FROM grouplist WHERE gid='%1$s'
gidsbymem SELECT gid FROM grouplist WHERE username='%1$s'
host localhost
database indimail
username indimail
password xxxxxxxx
socket /run/mysqld/mysqld.sock
#port 3306
pidfile /run/indimail/pwdlookup/nssd.pid
threads 5
timeout -1
facility daemon
priority info