Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make search query configurable #4

Open
ConsoleCriminal opened this issue Jan 16, 2019 · 1 comment
Open

Make search query configurable #4

ConsoleCriminal opened this issue Jan 16, 2019 · 1 comment

Comments

@ConsoleCriminal
Copy link

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.

@nakomoto
Copy link

nakomoto commented Aug 9, 2020

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 + '))')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants