problem with python-ldap and ZLDAP in scripts
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@optics.polsl.gliwice.pl
Adam Szpakowski wrote at 2003-10-19 14:20 +0200:
... 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.
This is highly unlikely. Security issues do not lead to a hanging process. Are you sure that the LDAP server is accessible as "ldapserver". What you describe looks like what we saw with a bad configuration to access the LDAP server.
Is there any way to use python-ldap under zope?
We use it successfully together with LDAPUserFolder. Dieter
Dieter Maurer wrote:
Are you sure that the LDAP server is accessible as "ldapserver". What you describe looks like what we saw with a bad configuration to access the LDAP server.
Thats for sure is not a problem with LDAP server or wrong access configuration. I have access to this ldap server on the same machie where zope runs from clean python. So the problem seems to be in zope.
Is there any way to use python-ldap under zope? We use it successfully together with LDAPUserFolder.
I have to say that I'm quite confused. I wrote a small product for zope a tries to bind to the ldap server from this product. Effect is the same... Zope process get error and die. Now I'm seting up ZEO environment to trace the problem. Adam -- Adam Szpakowski Silesian University of Technology - Institute of Physics Department of Optoelectronic e-mail: worf@optics.polsl.gliwice.pl
Adam Szpakowski wrote at 2003-10-20 10:46 +0200:
... I have to say that I'm quite confused. I wrote a small product for zope a tries to bind to the ldap server from this product. Effect is the same... Zope process get error and die.
That is different from what you reported before -- and much easier: If you get an error, the error is likely to give some clue with respect to the problem... Dieter
participants (2)
-
Adam Szpakowski -
Dieter Maurer