postgresql passdb backend problem and patch
angelo.ciurlia at laposte.net
Mon Apr 19 13:49:57 GMT 2004
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
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
And samba-3.0.2a/examples/pdb/pgsql/smb.pgsql.conf is a sample conf to
add at smb.conf.
in Postgresql "user" is keyword so use it like a table name maybe (is)
so i propose : smb_user or anything else but not a keyword.
more it seem it possible to specifie the CONFIG_TABLE_DEFAULT in
smb.conf but i didn't succeed.(if anyone has the good syntax....)
-#define CONFIG_TABLE_DEFAULT "user"
+#define CONFIG_TABLE_DEFAULT "smb_user"
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
"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
Mairie de CAUDRY
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3238 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20040419/48f61fb6/passdb-pgsql.obj
More information about the samba-technical