groups Command
Purpose
Displays group membership.
Syntax
groups [ User... ]
Description
By default, the groups command writes the group membership information of the current process to the standard output. If multiple users are specified as command parameters, the group membership for each user is displayed from the database.
The groups command will continue its operation with the next user in the parameter list after issuing a warning message if the user given is not found in the user database.
Security
Access Control: This program should be installed as a normal user program in the Trusted Computing Base.
Examples
To display the group membership of users listed in the parameter list, enter:
$ groups sys root lp adm
sys : sys
root : system bin sys security cron audit lp
lp : lp printq
adm : adm
Files
Item | Description |
---|---|
/usr/bin/groups | Contains the groups command |
/usr/ucb/groups | Symbolic link to the groups command |
/etc/group | Group file; contains group IDs |
/etc/ogroup | Previous version of the group file |
/etc/passwd | Password file; contains user IDs |
/etc/opasswd | Previous version of the password file. |