diff options
author | rcritten@redhat.com <rcritten@redhat.com> | 2007-08-13 16:41:38 -0400 |
---|---|---|
committer | rcritten@redhat.com <rcritten@redhat.com> | 2007-08-13 16:41:38 -0400 |
commit | cfaa28150b6f0599b61acbb9b033327de9fd45ee (patch) | |
tree | 90af9a3a27037a5be8fc940b88a42b0e428a1ebc /ipa-admintools/ipa-finduser | |
parent | 794ef65abc79e99d596cacc195dfd2a5956a9a37 (diff) | |
download | freeipa-cfaa28150b6f0599b61acbb9b033327de9fd45ee.tar.gz freeipa-cfaa28150b6f0599b61acbb9b033327de9fd45ee.tar.xz freeipa-cfaa28150b6f0599b61acbb9b033327de9fd45ee.zip |
Basic LDAP connection pooling
Implement user search
Diffstat (limited to 'ipa-admintools/ipa-finduser')
-rw-r--r-- | ipa-admintools/ipa-finduser | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/ipa-admintools/ipa-finduser b/ipa-admintools/ipa-finduser index a54e141e7..b16c19d99 100644 --- a/ipa-admintools/ipa-finduser +++ b/ipa-admintools/ipa-finduser @@ -48,19 +48,22 @@ def main(): try: client = ipaclient.IPAClient() - ent = client.get_user(args[1]) - attr = ent.attrList() + users = client.find_users(args[1], sattrs=['dn','uid','cn','homeDirectory']) + for ent in users: + attr = ent.attrList() - print "dn: " + ent.dn + print "dn: " + ent.dn - for a in attr: - value = ent.getValues(a) - if isinstance(value,str): - print a + ": " + value - else: - print a + ": " - for l in value: - print "\t" + l + for a in attr: + value = ent.getValues(a) + if isinstance(value,str): + print a + ": " + value + else: + print a + ": " + for l in value: + print "\t" + l + # blank line between results + print except xmlrpclib.Fault, fault: print fault.faultString |