[Zope] problem with python-ldap and ZLDAP in scripts

Adam Szpakowski worf at optics.polsl.gliwice.pl
Sun Oct 19 08:20:50 EDT 2003


Hi,

I'm working on simple frontend for managing some user information in LDAP 
using Zope (Plone exactly). In this fronted different ousers should be able 
do bind to my LDAP server using different dn and creditentials. The only way 
to do it seems to be writing a set of python scripts. I wrote such scripts in 
python and they work's fine. But uder Zope there is a problem. I can't in any 
way bind to ldap server. All tries effect in hanging Zope process.

Exemplary scripts (used as Zope External Method):

def ldap_connection():
    try:
        import ldap
        l1 = ldap.initialize('ldap://ldapserver')
        l1.simple_bind('cn=user,dc=xxxxx','password')
        out = 1
    except:
        out = -1
    return out

Executing simple_bind hangs the Zope process. I supposed that there is a 
problem with Zope security. Is there any way to use python-ldap under zope?

Similar problem is in LDAP Connection object (from latest ZopeLDAP product). 
Everything works fine until I try some its "low level" methods (such as 
manage_close()). Effect: killed zope server process.

Of course all creds for LDAP connection are correct and LDAP server is 
accessible (and working). The system is Debian with Zope-2.6.2-2, 
python2.2-ldap-1.9.999.pre13-1 and zope-ldap-1.1.0-3.

Thank's in advance

-- 
Adam Szpakowski
Silesian University of Technology - Institute of Physics
Department of Optoelectronic
e-mail: worf at optics.polsl.gliwice.pl




More information about the Zope mailing list