getgroups

Description

The getgroups() function retrieves a list of all groups to which the specified user belongs. This information is taken from the /etc/groups file on the policy server host or the group map in NIS.

Not supported in Endpoint Privilege Management for Linux (EPM-L).

Syntax

result = getgroups([user]);

Arguments

user Optional. The name of the user for which the secondary group names should be retrieved. If this argument is not specified, then the value of the runuser variable is used.

Return Values

A list of character strings that contains all of the groups that the user belongs to. An error is returned if the user is invalid or null.

result = getgroups(runuser);

For more information, see getgroup.