[python-ldap] Python LDAP3 module or LDAP Module

Robert Clove cloverobert at gmail.com
Fri Sep 9 10:34:06 EDT 2016


Hi All,

I am using python 2.7, in that there is no ldap module even if i do pip
install ldap i don't get any module and if i do pip install ldap3 it get
installed.
But the problems is all the samples i see on the net i using ldap.
like i was trying a sample:

# build a client
ldap_client = ldap.initialize(LDAP_SERVER)
# perform a synchronous bind
ldap_client.set_option(ldap.OPT_REFERRALS,0)
ldap_client.simple_bind_s(LDAP_USERNAME, LDAP_PASSWORD)

it works with ldap but for ldap3, i have to do
ldap_client = ldap.connection(LDAP_SERVER)

i could not find the equivalent function for the following in ldap3
ldap_client.set_option(ldap.OPT_REFERRALS,0)
ldap_client.simple_bind_s(LDAP_USERNAME, LDAP_PASSWORD)

If u know the mapping in ldap3 to ldap or samples of ldap3 please send the
link

I am trying to run the following code here
https://blogs.oracle.com/marginNotes/entry/ldap_basics_with_python

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20160909/fe015266/attachment.html>


More information about the python-ldap mailing list