summaryrefslogtreecommitdiffstats
path: root/ipa-admintools
diff options
context:
space:
mode:
authorrcritten@redhat.com <rcritten@redhat.com>2007-09-05 13:14:23 -0400
committerrcritten@redhat.com <rcritten@redhat.com>2007-09-05 13:14:23 -0400
commit9b30f4674465b8e5f9bfcb359a9a9336dec0d120 (patch)
tree6cd0e8e521b315e17484445cd9b6507b5727244c /ipa-admintools
parent82943c31de32b0388a7c23e6e6a18cc9c99ac502 (diff)
downloadfreeipa-9b30f4674465b8e5f9bfcb359a9a9336dec0d120.tar.gz
freeipa-9b30f4674465b8e5f9bfcb359a9a9336dec0d120.tar.xz
freeipa-9b30f4674465b8e5f9bfcb359a9a9336dec0d120.zip
Enable LDAP SASL authentication using a forwarded kerberos ticket
Handle both SASL auth and proxied authentication Refactor LDAP connection code to be simpler Other small bug fixes
Diffstat (limited to 'ipa-admintools')
-rw-r--r--ipa-admintools/ipa-finduser4
-rw-r--r--ipa-admintools/ipa-usermod6
2 files changed, 9 insertions, 1 deletions
diff --git a/ipa-admintools/ipa-finduser b/ipa-admintools/ipa-finduser
index 167ac23d7..409d2e3de 100644
--- a/ipa-admintools/ipa-finduser
+++ b/ipa-admintools/ipa-finduser
@@ -50,7 +50,9 @@ def main():
client = ipaclient.IPAClient()
users = client.find_users(args[1], sattrs=['dn','uid','cn','homeDirectory'])
- if len(users) == 0:
+ counter = users[0]
+ users = users[1:]
+ if counter == 0:
print "No entries found for", args[1]
return 0
diff --git a/ipa-admintools/ipa-usermod b/ipa-admintools/ipa-usermod
index 0c61f4097..317289a60 100644
--- a/ipa-admintools/ipa-usermod
+++ b/ipa-admintools/ipa-usermod
@@ -59,6 +59,9 @@ def main():
except ipa.ipaerror.IPAError, e:
print "%s" % e.message
return 1
+ except kerberos.GSSError, e:
+ print "Could not initialize GSSAPI: %s/%s" % (e[0][0][0], e[0][1][0])
+ return 1
if options.gecos:
user.setValue('gecos', options.gecos)
@@ -79,6 +82,9 @@ def main():
except xmlrpclib.ProtocolError, e:
print "Unable to connect to IPA server: %s" % (e.errmsg)
return 1
+ except ipa.ipaerror.IPAError, e:
+ print "%s" % (e.message)
+ return 1
return 0