diff --git a/conf/ldapcherry.ini b/conf/ldapcherry.ini index b412497..4415cf5 100644 --- a/conf/ldapcherry.ini +++ b/conf/ldapcherry.ini @@ -78,6 +78,7 @@ ldap.checkcert = 'off' ldap.user_filter_tmpl = '(uid=%(username)s)' ldap.group_filter_tmpl = '(member=%(username)s)' ldap.search_filter_tmpl = '(|(uid=%(searchstring)s*)(sn=%(searchstring)s*))' +ldap.objectclasses = 'top, person, organizationalPerson, user' ldap.timeout = 1 diff --git a/ldapcherry/backend/backendLdap.py b/ldapcherry/backend/backendLdap.py index 5c17f92..94a89a4 100644 --- a/ldapcherry/backend/backendLdap.py +++ b/ldapcherry/backend/backendLdap.py @@ -28,6 +28,7 @@ class Backend(ldapcherry.backend.Backend): self.user_filter_tmpl = self.get_param('user_filter_tmpl') self.group_filter_tmpl = self.get_param('group_filter_tmpl') self.search_filter_tmpl = self.get_param('search_filter_tmpl') + self.objectclasses = self.get_param('objectclasses') self.attrlist = [] for a in attrslist: try: diff --git a/tests/cfg/ldapcherry.ini b/tests/cfg/ldapcherry.ini index b15b8f5..18ff3d7 100644 --- a/tests/cfg/ldapcherry.ini +++ b/tests/cfg/ldapcherry.ini @@ -78,6 +78,7 @@ ldap.checkcert = 'off' ldap.user_filter_tmpl = '(uid=%(username)s)' ldap.group_filter_tmpl = '(member=%(userdn)s)' ldap.search_filter_tmpl = '(|(uid=%(searchstring)s*)(sn=%(searchstring)s*))' +ldap.objectclasses = 'top, person, organizationalPerson, user' ldap.timeout = 1 ad.module = 'ldapcherry.backend.backendSamba4' diff --git a/tests/test_BackendLdap.py b/tests/test_BackendLdap.py index 0fc4c72..7333b96 100644 --- a/tests/test_BackendLdap.py +++ b/tests/test_BackendLdap.py @@ -26,6 +26,7 @@ cfg = { 'user_filter_tmpl' : '(uid=%(username)s)', 'group_filter_tmpl' : '(member=%(userdn)s)', 'search_filter_tmpl' : '(|(uid=%(searchstring)s*)(sn=%(searchstring)s*))', +'objectclasses' : 'top, person, organizationalPerson, user', } cherrypy.log.error = syslog_error