nginx-ldap
nginx-ldap copied to clipboard
Make search query configurable
Currently, the search base is hardcoded:
data = ldap_connection.search_s([...], filterstr='(&(objectClass=user)(sAMAccountName=' + user + '))')
This may be fine for Active Directory, but unusable on standard LDAP schemas like iNetOrgPerson, account, etc.
Same issue here!
I am using OpenLDAP with schema iNetOrgPerson and memberOf overlay. I changed it to data = ldap_connection.search_s(base=conf['base'], scope=ldap.SCOPE_SUBTREE, filterstr='(uid=' + user + '))')