The inusernetgroup() function determines if a user is a member of a specific netgroup.
result = inusernetgroup (netgroupname, username);
|netgroupname||Required. Name of the netgroup to query.|
|username||Required. Name of the user in question.|
|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, please see innetgroup.