minschema python problems
jelmer at samba.org
Fri Oct 3 12:15:06 GMT 2008
Am Donnerstag, den 02.10.2008, 10:35 -0700 schrieb tridge at samba.org:
> I'm having troubles making the minschema python script work. The
> problem is that the ldb.Ldb(url) call immediately calls a
> ildb_connect() without having any opportunity to setup the credentials
> or loadparm context.
> We have ldb.set_credentials() and
> ldb.set_loadparm() python methods, but those can only be called once
> we have a ldb object, and creating the object fails as we haven't
> setup the loadparm and credentials opaque variables in ldb.
> Any suggestions on how to fix this?
There are two ways to work around this; the Ldb() constructor also
accepts optional arguments with credentials and lp_ctx. If you don't
specify the URL to Ldb() it will create an unconnected Ldb object, that
you can then afterwards connect using handle.connect(url).
See also the API docs at
minschema.py seems to already use the credentials specified on the
command-line though. Did you try specifying them that way?
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
More information about the samba-technical