Simple test failing

Marc Lanctot sysadmin at meteo.mcgill.ca
Fri Jun 2 16:41:25 CEST 2006


Michael Ströder wrote:
> Marc Lanctot wrote:
> 
>>I'm trying to get pykota working with LDAP and running into problems
>>connecting to the LDAP server.
> 
> 
> Which LDAP server? Which version?
> 

LOL, sorry... I expected it to be quite a common problem.

I'm running OpenLDAP server on a 32-bit RHES 3 (Taroon Update 5). I 
installed it from the usual up2date:

[mlanct2 at zephyr mlanct2]$ rpm -qa | grep openldap
openldap-devel-2.0.27-20
openldap-2.0.27-20
openldap-servers-2.0.27-20
openldap-clients-2.0.27-20
[mlanct2 at zephyr mlanct2]$

Weird, I was quite sure I had an version 3 server ... my clients can 
connect fine using pam_ldap around the dept.

>>self._ldap_call(self._l.simple_bind,who,cred,serverctrls,clientctrls)
>>  File "/usr/lib64/python2.3/site-packages/ldap/ldapobject.py", line 94,
>>in _ldap_call
>>    result = func(*args,**kwargs)
>>ldap.ENCODING_ERROR: {'desc': 'Encoding error'}
>>tsunami:~ #
> 
> 
> Which version of python-ldap are you using and which OpenLDAP libs are
> used by python-ldap?

The client script runs on a Suse (x86_64) 9.2 machine. Version

tsunami:~ # cat /etc/SuSE-release
SuSE Linux 9.2 (x86-64)
VERSION = 9.2
tsunami:~ # rpm -qa | grep ldap
ldapcpplib-0.0.3-28
openldap2-client-2.2.15-5.3
pam_ldap-169-29.2
nss_ldap-215-60.2
openldap2-2.2.15-5.1
yast2-ldap-2.10.4-2
yast2-ldap-client-2.10.7-2
python-ldap-2.0.2-2.1
php4-ldap-4.3.8-8.2
tsunami:~ #

Weird, the clients also list as v2 here ... but in the desc. it says v3. 
  Also, the ldap* commands work fine from this machine.

> You simply have to pass the clear-text password to the simple_bind()
> method call. (You probably want to use simple_bind_s() though.)

Ok, but will it use the "password: md5" setting from /etc/ldap.conf to 
encrypt the password?

And, can you tell me what "encoding error" means?

Thanks,
Marc

-- 
"The ships hung in the sky in much the same way that bricks don't."
   -- Douglas Adams



More information about the python-ldap mailing list