getgroup

The getgroup() function retrieves the first occurrence of the group name that is associated with the GID to which the specified user belongs. This information is taken from the gecos field of /etc/passwd on the policy server host or the password map in NIS.

result = getgroup([user]);
user Optional. The name of the user for which the group should be retrieved. If this argument is not specified, the value of the runuser variable is used.

If the user is found, result contains the first occurrence of the group name that is associated with the GID to which the specified user belongs as found in /etc/passwd or the NIS password map. An error is returned if the user is null or invalid.

result = getgroup("SysAdm001");

In this example, if SysAdm001 is found, result contains the first occurrence of the group name that is associated with the GID to which the specified user belongs.

For more information, please see getgroups.