diff options
author | Simo Sorce <ssorce@redhat.com> | 2007-09-20 17:11:01 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2007-09-20 17:11:01 -0400 |
commit | e16e215cddffc28c69a1c55bea408f108027eeac (patch) | |
tree | 301425db2aa0c4bcd409eec38c9b434f46c7d2d8 /ipa-python/ipaclient.py | |
parent | 3fd4b9ba2ce40ff068bdfb8cd5ff3d04d26119aa (diff) | |
parent | fbfefe6b0e5723b79b0f9a3a96f93e9336017fd8 (diff) | |
download | freeipa-e16e215cddffc28c69a1c55bea408f108027eeac.tar.gz freeipa-e16e215cddffc28c69a1c55bea408f108027eeac.tar.xz freeipa-e16e215cddffc28c69a1c55bea408f108027eeac.zip |
Merge with upstream
Diffstat (limited to 'ipa-python/ipaclient.py')
-rw-r--r-- | ipa-python/ipaclient.py | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/ipa-python/ipaclient.py b/ipa-python/ipaclient.py index fcfb29f1d..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 @@ -93,11 +99,11 @@ class IPAClient: result = self.transport.get_add_schema() return result - def find_users(self, criteria, sattrs=None): + def find_users(self, criteria, sattrs=None, searchlimit=0): """Return a list: counter followed by a User object for each user that matches the criteria. If the results are truncated, counter will be set to -1""" - result = self.transport.find_users(criteria, sattrs) + result = self.transport.find_users(criteria, sattrs, searchlimit) counter = result[0] users = [counter] @@ -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.""" @@ -161,13 +174,14 @@ class IPAClient: result = self.transport.add_group(group_dict, group_container) return result - def find_groups(self, criteria, sattrs=None): + def find_groups(self, criteria, sattrs=None, searchlimit=0): """Find groups whose cn matches the criteria. Wildcards are acceptable. Returns a list of Group objects.""" - result = self.transport.find_groups(criteria, sattrs) + result = self.transport.find_groups(criteria, sattrs, searchlimit) + counter = result[0] - groups = [] - for attrs in result: + groups = [counter] + for attrs in result[1:]: if attrs is not None: groups.append(group.Group(attrs)) |