- added configuration templates for FreeBSD's libnss-mysql, fixes #228
This commit is contained in:
20
templates/misc/configfiles/freebsd/libnss/etc_nsswitch.conf
Normal file
20
templates/misc/configfiles/freebsd/libnss/etc_nsswitch.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
# Make sure that `passwd`, `group` and `shadow` have mysql in their lines
|
||||
# You should place mysql at the end, so that it is queried after the other mechanisams
|
||||
#
|
||||
passwd: compat mysql
|
||||
group: compat mysql
|
||||
shadow: compat mysql
|
||||
|
||||
hosts: files dns
|
||||
networks: files dns
|
||||
|
||||
services: db files
|
||||
protocols: db files
|
||||
rpc: db files
|
||||
ethers: db files
|
||||
netmasks: files
|
||||
netgroup: files
|
||||
bootparams: files
|
||||
|
||||
automount: files
|
||||
aliases: files
|
||||
@@ -0,0 +1,2 @@
|
||||
username <SQL_UNPRIVILEGED_USER>
|
||||
password <SQL_UNPRIVILEGED_PASSWORD>
|
||||
@@ -0,0 +1,18 @@
|
||||
getpwnam SELECT username, 'x', uid, gid, '0', '', 'MySQL User', homedir, shell, '0' FROM ftp_users WHERE username='%1$s' LIMIT 1
|
||||
getpwuid SELECT username, 'x', uid, gid, '0', '', 'MySQL User', homedir, shell, '0' FROM ftp_users WHERE uid='%1$u' LIMIT 1
|
||||
getpwent SELECT username, 'x', uid, gid, '0', '', 'MySQL User', homedir, shell, '0' FROM ftp_users
|
||||
getspnam SELECT username, password, '12345', '0', '99999', '7', '', '', '' FROM ftp_users WHERE username='%1$s' LIMIT 1
|
||||
getspent SELECT username, password, '12345', '0', '99999', '7', '', '', '' FROM ftp_users
|
||||
getgrnam SELECT groupname, '', gid FROM ftp_groups WHERE groupname='%1$s' LIMIT 1
|
||||
getgrgid SELECT groupname, '', gid FROM ftp_groups WHERE gid='%1$u' LIMIT 1
|
||||
getgrent SELECT groupname, '', gid FROM ftp_groups
|
||||
memsbygid SELECT username FROM ftp_users WHERE gid='%1$u'
|
||||
gidsbymem SELECT gid FROM ftp_users WHERE username='%1$s'
|
||||
|
||||
host <SQL_HOST>
|
||||
database <SQL_DB>
|
||||
username <SQL_UNPRIVILEGED_USER>
|
||||
password <SQL_UNPRIVILEGED_PASSWORD>
|
||||
port 3306
|
||||
timeout 10
|
||||
compress 0
|
||||
Reference in New Issue
Block a user