- added configuration templates for FreeBSD's libnss-mysql, fixes #228

This commit is contained in:
Michael Kaufmann (d00p)
2010-05-17 05:33:32 +00:00
parent ea24918785
commit 785e8f0938
4 changed files with 61 additions and 2 deletions

View 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

View File

@@ -0,0 +1,2 @@
username <SQL_UNPRIVILEGED_USER>
password <SQL_UNPRIVILEGED_PASSWORD>

View File

@@ -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