mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-07 19:05:39 +00:00
Fix AD searchfilter
This commit is contained in:
parent
1ccd98a364
commit
02323d2fad
@ -150,7 +150,7 @@ class User(db.Model):
|
|||||||
if LDAP_TYPE == 'ldap':
|
if LDAP_TYPE == 'ldap':
|
||||||
searchFilter = "cn=%s" % self.username
|
searchFilter = "cn=%s" % self.username
|
||||||
else:
|
else:
|
||||||
searchFilter = "sammaaccount=%s" % self.username
|
searchFilter = "(&(objectcategory=person)(samaccountname=%s))" % self.username
|
||||||
try:
|
try:
|
||||||
result = self.ldap_search(searchFilter, LDAP_SEARCH_BASE)
|
result = self.ldap_search(searchFilter, LDAP_SEARCH_BASE)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
Loading…
Reference in New Issue
Block a user