groupls -- list attributes of a group


User syntax:
/etc/groupls [user[,user] ...| ]

Administrative syntax:
/etc/groupls -a|-D [-o] [-S system_name] [-x extendedOptionString]
[-X optionsFile]

/etc/groupls -g|-A group1,group2,... [-o] [-x extendedOptionString] [-X


Without arguments, the groupls command generates a list of groups the user belongs to. The user syntax also allows a list of usernames to be specified.

The first form of the administrative syntax provides a list of all groups on the specified system (-a) or lists the group defaults (-D) for the specified system. Extended option strings allow you to view other attributes. For example, groupls -D -x "maxGid maxSuggestGid" outputs the values associated with maxGid and maxSuggestGid, one per line.

The second form generates a list of GIDs and members of the groups specified.

The output of groupls is attribute value pairs enclosed in braces, which is suitable for use in an option file for groupadd(ADM).


The following options are supported:

Lists all attributes associated with the specified group(s).

Lists the system-wide defaults for attributes specified with the -x or -X options. Without any other options, lists the next available GID.

-g group_name
Reports all attributes associated with group group_name.

Causes displayed information to be delimited with colons (:).

-S hostname
Specifies the host from which the information is to be taken.

-x extendedOptionString
Lists extended group account attributes. Most attributes are group parameters that can be changed; the groupls command can only be used to query them. See groupadd(ADM) for a list of group account attributes.

-X optionsFile
Specify the file from which the group attributes are to be taken.

Exit values

Upon completion, this utility exits with one of the following values:

The operation was successful.

An error occurred.


group file

local group file for NIS servers

distributed group file for NIS servers

Subsystem Authorizations database

user/group account creation defaults

See also

groupadd(ADM), useradd(ADM)

Standards conformance

groupls is conformant with USL SVID Issue 3.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003