Documentation

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

netgroupRequired. Name of the netgroup to query.
hostRequired. The name of the machine in question.
userOptional. The user name.
domainOptional. The user name.

Return values

trueThe specified machine is a member of the specified netgroup.
falseThe 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

netgroupnameRequired. Name of the netgroup to query.
username Required. Name of the user in question.

Return values

trueThe specified user is a member of the specified netgroup.
falseThe 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.


©2003-2025 BeyondTrust Corporation. All Rights Reserved. Other trademarks identified on this page are owned by their respective owners. BeyondTrust is not a chartered bank or trust company, or depository institution. It is not authorized to accept deposits or trust accounts and is not licensed or regulated by any state or federal banking authority.