diff --git a/bin/showgroup.py b/bin/showgroup.py
index 6f23bed31f36b3ccb04ffd6cc9ed750b82ed7d64..6faac89912a88cb6f98bbbfd480679d5415309c4 100755
--- a/bin/showgroup.py
+++ b/bin/showgroup.py
@@ -20,13 +20,20 @@ NOOPTS = collections.OrderedDict()
 NOOPTS['no-member'] = 'memberUid'
 NOOPTS['no-gid'] = 'gidNumber'
 NOOPTS['no-owner'] = 'owner'
+NOOPTS['no-uid'] = 'uidNumber'
+NOOPTS['no-name'] = 'gecos'
 
 
 def main():
     description = 'Show groups or group members'
     arg = 'group'
     arg_help = 'The group name (cn), or wildcards (*, cn* , *cn*)'
-    args = argparser.simple(description, arg=arg, arg_help=arg_help, opts=OPTS, noopts=NOOPTS)
+    parser = argparser.extendable(description, arg=arg, arg_help=arg_help, opts=OPTS, noopts=NOOPTS)
+    parser.add_argument('--uids', dest='uid_only', action='store_const', const=True,
+                        help='Show uids only')
+    parser.add_argument('--names', dest='name_only', action='store_const', const=True,
+                        help='Show real names only')
+    args = vars(parser.parse_args())
 
     ldap = dphysldap.Ldap()
 
@@ -50,23 +57,34 @@ def main():
         group = groups[0]
         members = group['memberUid']
 
-        print('Group {} ({}):'.format(group['cn'], group['gidNumber']))
-        print('Owner: {}'.format(group['owner']))
-        print('Report: {}'.format(group['reportEnabled']))
-        print('Reported to: {}'.format(group['reportUid']))
+        if not args['name_only'] and not args['uid_only']:
+            print('Group {} ({}):'.format(group['cn'], group['gidNumber']))
+            print('Owner: {}'.format(group['owner']))
+            print('Report: {}'.format(group['reportEnabled']))
+            print('Reported to: {}'.format(group['reportUid']))
 
         if members:
             del OPTS['report']
 
             attrs = ['uid', 'uidNumber', 'gecos']
             attrs.extend([v for k, v in OPTS.items() if args[k]])
+            for attr in [v for k, v in NOOPTS.items() if args[k]]:
+                if attr in attrs:
+                    attrs.remove(attr)
 
             users = dphysldap.Users(ldap, attrs)
             users.search(';'.join(members))
             users.sort('uid')
 
-            print('Members:')
-            print(users)
+            if args['uid_only']:
+                for user in users:
+                    print(user['uid'])
+            elif args['name_only']:
+                for user in users:
+                    print(user['gecos'])
+            else:
+                print('Members:')
+                print(users)
 
         else:
             print('Members: none')