postgresql passdb backend problem and patch
jelmer at vernstok.nl
Mon Apr 19 15:51:23 GMT 2004
On Mon, Apr 19, 2004 at 03:49:57PM +0200, CIURLIA Angelo wrote about 'postgresql passdb backend problem and patch':
> i try tu use samba with the postgresql passdb backend.
> i had minor problem , i dont know if anyone has deal with it but that
> my solution.
> an sql db dump sample exist for mysql not for posgresql, so
> samba-3.0.2a/examples/pdb/pgsql/pdb_pgsql.sql is a schema dump that work
> for me.
> And samba-3.0.2a/examples/pdb/pgsql/smb.pgsql.conf is a sample conf to
> add at smb.conf.
> in last when i insert user whith pdbedit, that's done in lowercase, but
> when authentificating with win98 the query field is in uppercase. in
> postgresql unlike mysql(it seems) the equal string operator is case
> so :
> "SELECT ... FROM %s WHERE %s = '%s'",
> "SELECT ... FROM %s WHERE %s ILIKE '%s'",
> but ilke operator doesn't seems exist in mysql....
> "SELECT ... FROM %s WHERE lower(%s) = 'lower(%s)'",
> may be a better solution(more compatible) ??? i don't test it
> or maybe make to function one for mysql, one for postgresql.... as you
ILIKE doesn't exist in MySQL, so you'll have to come up with a
different solution - perhaps there's a common strtolower() function
both postgresql and mysql have? Is there any way you can specify that
fields are case-insensitive in postgresql?
Jelmer Vernooij <jelmer at vernstok.nl> - http://jelmer.vernstok.nl/
More information about the samba-technical