From 86815ec24c9c194f446a0800d8b7d738c597eea4 Mon Sep 17 00:00:00 2001 From: Nico von Geyso Date: Fri, 21 Sep 2012 01:36:16 +0200 Subject: fixed _alter_passwords() --- account.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'account.py') diff --git a/account.py b/account.py index ef70d9d..2377315 100644 --- a/account.py +++ b/account.py @@ -124,7 +124,7 @@ class AccountService: """ user = 'uid=%s,ou=users' % account.uid if admin_user: - user = 'cn=%' % user + user = 'cn=%s' % admin_user password = account.password if admin_pass: @@ -186,15 +186,14 @@ class AccountService: account.new_password_root = None - for service, password in account.new_password_services: + for service, password in account.new_password_services.items(): attr = [ - (ldap.MOD_REPLACE, 'objectClass', LDAP_OBJECT_CLASS) (ldap.MOD_REPLACE, 'userPassword', password) ] - dn = 'uid=%s,ou=services,cn=%s,%s' % (account.uid, service, self.base_dn) + dn = 'uid=%s,cn=%s,ou=services,%s' % (account.uid, service, self.base_dn) self.connection.modify_s(dn, attr) - account.new_password_services = [] + account.new_password_services = {} -- cgit v1.2.3-1-g7c22