collective / pas.plugins.ldap

Zope (and Plone) PAS Plugin providing users and groups from LDAP directory
http://pypi.python.org/pypi/pas.plugins.ldap
Other
13 stars 20 forks source link

Plone 5.0.8 - pas.plugins.ldap1.5.2 connection test fails #50

Closed Alxndr3 closed 5 years ago

Alxndr3 commented 6 years ago

Hi! Please, I'm experiencing the following issue with pas.plugins.ldap1.5.2, Plone 5.0.8 and Ubuntu16.04.3 when trying to connect to Active Directory.

The message in the Plone interface is: ERROR: Exception in Users;

In the /opt/plone/zinstance/var/log/instance.log is:

2017-11-22T13:36:32 ERROR pas.plugins.ldap Non-LDAP error while connection test! Traceback (most recent call last): File "/opt/plone/buildout-cache/eggs/pas.plugins.ldap-1.5.2-py2.7.egg/pas/plugins/ldap/properties.py", line 153, in connection_test ugm.users.iterkeys().next() StopIteration

jensens commented 6 years ago

The error message is misleading. In fact, it means the LDAP connection works fine, but there is no single user found with the given configuration.

jensens commented 6 years ago

Also you may want to get some inspiration from @fredvd talk at Plone Conference last October https://www.slideshare.net/fredvd/plone-paspluginsldap-usergroup-search

Alxndr3 commented 6 years ago

Thank you very much! The inspiration came.

Users search query filter (&(objectClass=user)(objectCategory=person))