diff options
author | Rob Crittenden <rcrit@ipa.greyoak.com> | 2008-08-21 10:32:40 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-08-22 18:02:20 -0400 |
commit | 76bf420754d5dc38ad71f56be456505115e18357 (patch) | |
tree | 68fa68926c71d811b229f5892db07c7a9a1fbc5f /ipa-admintools | |
parent | c7ee747ee50dcf14f3de670bb85e2225fc5d3ac8 (diff) | |
download | freeipa.git-76bf420754d5dc38ad71f56be456505115e18357.tar.gz freeipa.git-76bf420754d5dc38ad71f56be456505115e18357.tar.xz freeipa.git-76bf420754d5dc38ad71f56be456505115e18357.zip |
Display name as separate attributes instead of showing common name.
We allow one to individually set first and last name but we do not
automatically update the common name so changes don't seem to happen.
451318
Diffstat (limited to 'ipa-admintools')
-rw-r--r-- | ipa-admintools/ipa-finduser | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/ipa-admintools/ipa-finduser b/ipa-admintools/ipa-finduser index 40384a3b..919c4b92 100644 --- a/ipa-admintools/ipa-finduser +++ b/ipa-admintools/ipa-finduser @@ -93,7 +93,7 @@ def main(): client = ipaclient.IPAClient(verbose=options.verbose) if options.all is None: - users = client.find_users(args[1], sattrs=['uid','cn','homeDirectory','loginshell']) + users = client.find_users(args[1], sattrs=['uid','givenname','sn','homeDirectory','loginshell']) else: users = client.find_users(args[1], sattrs=None) @@ -121,6 +121,18 @@ def main(): for ent in users: attr = ent.attrList() attr.sort() + + # Always have sn following givenname + try: + l = attr.index('givenname') + try: + attr.remove('sn') + attr.insert(l+1, 'sn') + except ValueError: + pass + except ValueError: + pass + if options.notranslate: labels = {} for a in attr: |