summaryrefslogtreecommitdiffstats
path: root/ipa-python/ipaadminutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-python/ipaadminutil.py')
-rw-r--r--ipa-python/ipaadminutil.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipa-python/ipaadminutil.py b/ipa-python/ipaadminutil.py
index 27337642..5f0b2fa9 100644
--- a/ipa-python/ipaadminutil.py
+++ b/ipa-python/ipaadminutil.py
@@ -33,7 +33,10 @@ def select_user(counter, users):
i = 1
print "%s entries were found. Which one would you like to display?" % counter
for ent in users:
- print "%s: %s (%s)" % (i, ent.getValues('cn'), ent.getValues('uid'))
+ if (ent.getValues('givenname')) is not None:
+ print "%s: %s %s (%s)" % (i, ent.getValues('givenname'), ent.getValues('sn'), ent.getValues('uid'))
+ else:
+ print "%s: %s (%s)" % (i, ent.getValues('sn'), ent.getValues('uid'))
i += 1
while True:
resp = raw_input("Choose one: (1 - %s), 0 for all, q to quit: " % counter)