1
0
Fork 0
mirror of https://github.com/kakwa/ldapcherry synced 2025-07-04 20:37:48 +02:00

fix password setting with Active Directory

This commit is contained in:
kakwa 2016-06-16 21:49:48 +02:00
parent c320fa9da6
commit c969e730c4
2 changed files with 72 additions and 4 deletions

View file

@ -292,15 +292,19 @@ class Backend(ldapcherry.backend.Backend):
return True
else:
return False
def attrs_pretreatment(self, attrs):
attrs_str = {}
for a in attrs:
attrs_str[self._str(a)] = self._str(attrs[a])
return attrs_str
def add_user(self, attrs):
"""add a user"""
ldap_client = self._bind()
attrs_str = {}
# encoding crap
for a in attrs:
attrs_str[self._str(a)] = self._str(attrs[a])
attrs_str = self.attrs_pretreatment(attrs)
attrs_str['objectClass'] = self.objectclasses
# construct is DN
dn = \