From: Michael <mi...@st...> - 2000-06-22 20:53:44
|
Timothy Wilson wrote: > > our NDS (v7.45) directory. > [..] > 'Browse' tab, I got an INVALID_DN_SYNTAX error. > [..] > problem lies in searching with SCOPE_ONELEVEL. > [..] > "ou=do, o=ISD_197" ^ Those spaces sometimes confuse the libs. I usually normalize the DNs (deleting those spaces etc.). > >>> import ldap > >>> l = ldap.open("10.3.6.1", 389) > >>> l.simple_bind_s("o=ISD_197", "") > >>> test1 = l.search_s("ou=do, o=ISD_197", ldap.SCOPE_SUBTREE, > "objectclass=*") > >>> test2 = l.search_s("ou=do, o=ISD_197", ldap.SCOPE_ONELEVEL, > "objectclass=*") > Traceback (innermost last): > File "<stdin>", line 1, in ? > ldap.INVALID_DN_SYNTAX: {'desc': 'Invalid DN syntax'} IMHO this exception message is generated by the server. You might wanna check if my package http://web2ldap.de is able to browse your server. > I changed the reference in ZLDAP.py to SCOPE_SUBTREE and ZLDAP works fine. Strange. > Except, and this is a big 'except,' when I try to browse our entire tree. I > think that using SCOPE_SUBTREE is causing the search to retrieve the same > data over and over again. When browsing you should limit the attributes to receive for saving bandwidth and server load. See web2ldap. Ciao, Michael. |