[python3-ldap] Development Question

Paul G. paul.list at isrcomputing.com
Fri Sep 20 22:34:03 CEST 2013


Hi,

I downloaded 'python3-ldap-0.6.0-beta' and tested it. It failed to work for me.


from ldap3 import connection, server
from ldap3 import AUTH_SIMPLE, STRATEGY_SYNC, STRATEGY_ASYNC_THREADED,
SEARCH_DEREFERENCE_ALWAYS, SEARCH_SCOPE_WHOLE_SUBTREE, GET_ALL_INFO
import pprint
s = server.Server(LDAP_HOST, port = 389, getInfo = GET_ALL_INFO)
c = connection.Connection(s, autoBind = True, clientStrategy = STRATEGY_SYNC,
user=LDAP_USER, password=LDAP_PASS, authentication=AUTH_SIMPLE)
print(s.info)
result = c.search('o=hcc','(objectClass=*)', SEARCH_SCOPE_WHOLE_SUBTREE,
SEARCH_DEREFERENCE_ALWAYS, attributes = ['cn','ou','uid']);
pprint.PrettyPrinter(indent=4).pprint(c);
pprint.PrettyPrinter(indent=4).pprint(result);
c.unbind();

It returns with:

Connection(server=Server(host='XXXXX', port=389, ssl=False, getInfo=3),
user='XXXXX', password='YYYYYY', autoBind=True, version=3, authentication=1,
clientStrategy=0, autoReferrals=True)
False


Is there a way to turn on extra debugging to see where the script is failing?

Regards,
Paul G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python3-ldap/attachments/20130920/d6fce723/attachment.html>


More information about the python3-ldap mailing list