NFS Services Administrator's Guide

Configuring and Administering NFS
Configuring and Using NFS Netgroups
Chapter 2128
or
nistbladm -a group=netgroup host= user= domain= \
comment= netgroup.org_dir
In the NIS+ netgroup table, each netgroup may consist of multiple table
entries. Each table entry specifies either a (host, user, domain) triple or
an included netgroup. Each entry may contain a comment in the last
column.
For information on the general syntax of netgroups and how they are
used, see “To Create Netgroups in the /etc/netgroup File” on page 125.
For more information on NIS+, see “Configuring and Administering
NIS+” on page 199.
To Use Netgroups in Configuration Files
Netgroups may be used in the following files:
/etc/exports, in the -access list
/etc/hosts.equiv or $HOME/.rhosts, in place of a host name or
user name
/etc/passwd, to tell processes whether to look in the NIS password
database for information about the users in the netgroup
/etc/group, to tell processes whether to look in the NIS group
database for information about the users in the netgroup
The next few sections explain how to use netgroups in these files.
Using Netgroups in the /etc/exports File
In the /etc/exports file, netgroups can be used in the list of NFS clients
following the -access option, as in the following example:
/var/mail -access=mail_clients
The mail_clients netgroup is defined as follows:
mail_clients (cauliflower, , ), (broccoli, , ), (cabbage, , )
Only the host names from the netgroup are used. If the netgroup also
contains user names, these are ignored. This netgroup is valid in any
NIS domain, because the third field in each triple is left blank.