Python-LDAP doesn't like crypt-passwords with 41bit?

Michael Ströder michael at stroeder.com
Wed Jul 23 13:24:15 CEST 2008


sommerfeld at hs-heilbronn.de wrote:
> 
> Our passwords in the LDAP server are encrypted with “crypt” and stored 
> as 41bit binary values. The problem is that python-ldap doesn’t seem to 
> like 41bit passwords but only 20bit. When I try to authenticate by 
> Plone-LDAP / python-LDAP, it doesn’t work, cause the password doesn’t 
> match. (Our LDAP server stores the LDAP passwords as 41bit values by 
> standard)

1. I think you're saying bits but probably mean bytes.

2. If you're talking about using simple_bind_s() to bind to the server 
then you simply have to use the clear-text password and not the hashed one.

3. Actually there's no length limit in the API for any parameter.

> If I re-set the password then from Plone-LDAP / python-LDAP, the new 
> password is stored as 20bit binary and authentication works.

How do you set the password? You probably should get familiar with 
hashed passwords and how they are generated, stored and validated.

See: http://www.openldap.org/faq/data/cache/419.html

Ciao, Michael.



More information about the python-ldap mailing list