summaryrefslogtreecommitdiffstats
path: root/ipa-python
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-python')
-rw-r--r--ipa-python/ipaclient.py13
-rw-r--r--ipa-python/rpcclient.py16
2 files changed, 29 insertions, 0 deletions
diff --git a/ipa-python/ipaclient.py b/ipa-python/ipaclient.py
index 63537f269..880b47852 100644
--- a/ipa-python/ipaclient.py
+++ b/ipa-python/ipaclient.py
@@ -47,6 +47,12 @@ class IPAClient:
if self.local:
self.transport.set_principal(princ)
+ def set_krbccache(self,krbccache):
+ """Set the file location of the Kerberos credentials cache to be used
+ for LDAP authentication"""
+ if self.local:
+ self.transport.set_krbccache(krbccache)
+
# User support
def get_user_by_uid(self,uid,sattrs=None):
"""Get a specific user by uid. If sattrs is set then only those
@@ -123,6 +129,13 @@ class IPAClient:
result = self.transport.delete_user(uid)
return result
+ def modifyPassword(self,uid,oldpass,newpass):
+ """Modify a user's password"""
+
+ result = self.transport.modifyPassword(uid,oldpass,newpass)
+
+ return result
+
def mark_user_deleted(self,uid):
"""Set a user as inactive by uid."""
diff --git a/ipa-python/rpcclient.py b/ipa-python/rpcclient.py
index 9e51e981a..21ea68bc6 100644
--- a/ipa-python/rpcclient.py
+++ b/ipa-python/rpcclient.py
@@ -195,6 +195,22 @@ class RPCClient:
return result
+ def modifyPassword(self,uid,oldpass,newpass):
+ """Modify a user's password"""
+ server = self.setup_server()
+
+ if oldpass is None:
+ oldpass = "__NONE__"
+
+ try:
+ result = server.modifyPassword(uid,oldpass,newpass)
+ except xmlrpclib.Fault, fault:
+ raise ipaerror.gen_exception(fault.faultCode, fault.faultString)
+ except socket.error, (value, msg):
+ raise xmlrpclib.Fault(value, msg)
+
+ return result
+
def mark_user_deleted(self,uid):
"""Mark a user as deleted/inactive"""
server = self.setup_server()