Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ groups(1) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

id(1)

newgrp(1)

getgroups(2)

initgroups(3C)

cuserid(3S)

group(4)

GROUPS(1)

NAME

groups − show group memberships

SYNOPSIS

groups [ −p ] [ −g ] [ −l ] [ user ]

DESCRIPTION

The groups command shows the groups to which you or the optionally specified user belong.  If invoked with no arguments, groups prints the current access list returned by getgroups(2). 

Each user belongs to a group specified in the password file /etc/passwd and possibly to other groups as specified in the files /etc/group and /etc/logingroup.  A user is granted the permissions of those groups specified in /etc/passwd and /etc/logingroup at login time.  The permissions of the groups specified in /etc/group are normally available only with the use of newgrp(1).  If a user name is specified with no options, groups prints the union of all these groups. 

The -p, -g, and -l options limit the printed list to those groups specified in /etc/passwd, /etc/group, and /etc/logingroup, respectively.  If a user name is not specified with any of these options, cuserid(3S) will be called to determine the default user name.

The printed list of groups is sorted in ascending collation order (see Environment Variables below). 

EXAMPLES

The command:

groups -l tim

checks the file /etc/logingroup and displays all groups to which the user tim belongs. 

AUTHOR

Groups was developed by the University of California, Berkeley. 

FILES

/etc/group
/etc/logingroup
/etc/passwd

SEE ALSO

id(1), newgrp(1), getgroups(2), initgroups(3C), cuserid(3S), group(4). 

EXTERNAL INFLUENCES

Environment Variables

LC_COLLATE determines the order in which the output is sorted. 

If LC_COLLATE is not specified in the environment or is set to the empty string, the value of LANG is used as a default.  If LANG is not specified or is set to the empty string, a default of “C” (see lang(5)) is used instead of LANG.  If any internationalization variable contains an invalid setting, groups behaves as if all internationalization variables are set to “C” (see environ(5)).

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026