diff options
author | Rob Crittenden <rcritten@redhat.com> | 2008-10-20 22:41:53 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-10-20 22:41:53 -0400 |
commit | 8c54f730c0a156543f23ca90b6220ddd89d76dcc (patch) | |
tree | 587f1a53890b027cecc3745b3039c249abbdb31f /ipa_server | |
parent | d615e4dafb9c4f3d737143f826ed20be918317fe (diff) | |
download | freeipa-8c54f730c0a156543f23ca90b6220ddd89d76dcc.tar.gz freeipa-8c54f730c0a156543f23ca90b6220ddd89d76dcc.tar.xz freeipa-8c54f730c0a156543f23ca90b6220ddd89d76dcc.zip |
Framework for doing password changes
Need mechanism to prompt for new password twice and verify they are the same
Diffstat (limited to 'ipa_server')
-rw-r--r-- | ipa_server/plugins/b_ldap.py | 3 | ||||
-rw-r--r-- | ipa_server/servercore.py | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ipa_server/plugins/b_ldap.py b/ipa_server/plugins/b_ldap.py index 3a470b3f..e63865bb 100644 --- a/ipa_server/plugins/b_ldap.py +++ b/ipa_server/plugins/b_ldap.py @@ -143,6 +143,9 @@ class ldap(CrudBackend): return (exact_match_filter, partial_match_filter) + def modify_password(self, dn, **kw): + return servercore.modify_password(dn, kw.get('oldpass'), kw.get('newpass')) + # The CRUD operations def create(self, **kw): diff --git a/ipa_server/servercore.py b/ipa_server/servercore.py index ed3c093e..1f41d410 100644 --- a/ipa_server/servercore.py +++ b/ipa_server/servercore.py @@ -161,7 +161,7 @@ def get_entry_by_cn (cn, sattrs): """ # logging.info("IPA: get_entry_by_cn '%s'" % cn) # cn = self.__safe_filter(cn) - searchfilter = "(cn=%s)" % cn + searchfilter = "(cn=%s)" % cn return get_sub_entry("cn=accounts," + api.env.basedn, searchfilter, sattrs) def get_user_by_uid(uid, sattrs): @@ -311,6 +311,9 @@ def get_ipa_config(): return config +def modify_password(dn, oldpass, newpass): + return context.conn.getConn().modifyPassword(dn, oldpass, newpass) + def mark_entry_active (dn): """Mark an entry as active in LDAP.""" |