NFS Services Administrator's Guide
Configuring and Administering NFS
Configuring and Using NFS Netgroups
Chapter 2126
The NIS_domain field specifies the NIS domain in which the (host,
user, NIS_domain) triple is valid. For example, if the netgroup
database contains the following netgroup,
myfriends (sage,-,bldg1), (cauliflower,-,bldg2),
(pear,-,bldg3)
and an NFS server running NIS in the domain bldg1 exports a directory
only to the netgroup myfriends, only host sage may mount that
directory. The other two triples are ignored, because they are not valid in
the bldg1 domain.
If an HP-UX host not running NIS exports a directory to the netgroup
myfriends, the NIS_domain field is ignored, and all three hosts (sage,
cauliflower, and pear) may mount the directory.
If the netgroup database contains the following netgroup,
mydomain (,,bldg1)
and a host in the NIS domain bldg1 exports a directory to the netgroup
mydomain, any host in any domain may mount the directory, because the
host field is blank.
If an HP-UX host not running NIS exports a directory to the netgroup
mydomain, shown above, the NIS_domain field is ignored, but the host
field is used, so any host in any domain may mount the directory.
If a host in the NIS domain bldg2 exports a directory to the netgroup
mydomain, no host in any domain may mount the directory, because the
triple is not valid in the bldg2 domain, so it is ignored.
Netgroup Examples
The following netgroup specifies a group of hosts:
trusted_hosts (sage, , ), (basil, , ), (thyme, , )
The trusted_hosts netgroup could be used in the -access option of a
line in the /etc/exports file, as follows:
/usr -access=trusted_hosts
The following netgroup specifies a group of users:
administrators ( ,jane, ), ( ,art, ), ( ,mel, )
If this netgroup were ever accidentally included in a list of hosts rather
than users, the blank space would be interpreted as a wildcard meaning
any host. For example, if someone used this netgroup in a -access list in