extended provision-backend

paul paul at subsignal.org
Fri Aug 7 03:54:06 MDT 2009


Oliver Liebel schrieb:
>>> thank you very much!
>>> i call on you if i got some more questions.
>>>     
>> No worries.  Thanks!
>>   
> nearly done with ldb -ldapsearch.
> one more question:
> how can i handle the exception (when no rootdse is found,
> means, no slapds running). i tried this:
> 
>  try:
>         ldapi_uri = "ldapi://" +
> urllib.quote(os.path.join(paths.private_dir, "ldap", "ldapi"), safe="")
>         ldapi_db = Ldb(ldapi_uri)
>         search_ol_rootdse = ldapi_db.search(base="", scope=SCOPE_BASE,
>                           expression="(objectClass=OpenLDAProotDSE)");
>         message(search_ol_rootdse)
> 
>     except ldb.LdbError, e:
>         message("ldap-search Output:")
>    
> but i got this error, when slapd is not up:
> 
> " except ldb.LdbError, e:
> NameError: global name 'ldb' is not defined"
Have you missed to import the ldb module?

cheers
  Paul



More information about the samba-technical mailing list