[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LDAP v2



Hi all,

> I noticed that I
> could not connect to the slapd with protocol version 2.  After a fair
> amount of searching, I finally found where Howard states you must
> explicitly enable LDAP v.2 in the 2.1.x series:

That information is new to me also, and it actually solves a problem I had.
So yes, I agree with more prominent display of the explanation.  But it
seems that getting into the docs of OpenLDAP is hard in general though --
there's a lot of it, perhaps that's the whole problem.

To share what I saw solved:  python-ldap worked fine with OpenLDAP 2.0.x,
but not with 2.1.x, until I realised that the order for setup had to be:
 1. Set LDAPv3 as protocol version,
 	ldap.set_option (ldap.OPT_PROTOCOL_VERSION, ldap.VERSION3)
 2. Initialise the directory connection,
 	db = ldap.initialize ("ldap://"; + servername + ":" + str (ldap.PORT))
 3. Bind with the method of preference,
 	db.simple_bind_s ('cn=Manager,dc=xyz,dc=nom', 'wouldntyouliketoknow')

Other than this sort of startup problems, I found python-ldap (add .sf.net
for the website) to be pleasant to work with.  Quick, simple, logical.


Cheers,
Rick van Rein.