inusernetgroup
Description
The inusernetgroup() function determines if a user is a member of a specific netgroup.
Not supported in Endpoint Privilege Management for Linux (EPM-L).
Syntax
result = inusernetgroup (netgroupname, username);
Arguments
netgroupname | Required. Name of the netgroup to query. |
username | Required. Name of the user in question. |
Return Values
true | The specified user is a member of the specified netgroup. |
false | The specified user is not a member of the specified netgroup. |
currentuser = "sysadm1"; result = inusernetgroup ("myhosts", currentuser);
In this example, result contains an integer value of 1 (true) if sysadm1 is a member of the netgroup myhosts or 0 (false) if sysadm1 is not a member of the netgroup.
For more information, see innetgroup.