NIS
NIS functions are used to access the network information system.
innetgroup
Description
The innetgroup() function determines if a specific machine is a member of a netgroup.
Note
Not supported in Endpoint Privilege Management for Linux (EPM-L).
Syntax
result = innetgroup (netgroup, host [, user [, domain]])
Arguments
netgroup | Required. Name of the netgroup to query. |
host | Required. The name of the machine in question. |
user | Optional. The user name. |
domain | Optional. The user name. |
Return values
true | The specified machine is a member of the specified netgroup. |
false | The specified machine is not a member of the specified netgroup. |
Example
result = innetgroup ("myhosts", "machine1");
In this example, result contains an integer value of 1 (true) if machine1 is a member of the netgroup myhosts. result contains an integer value of 0 (false) if machine1 is not a member of the netgroup myhosts.
inusernetgroup
Description
The inusernetgroup() function determines if a user is a member of a specific netgroup.
Note
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. |
Example
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.
Note
For more information, see innetgroup.
Updated 5 days ago