NFS Services Administrator's Guide (762805-001, March 2014)

The setoncenv command initializes, displays, and removes the value of NFS configuration
variables found in either of the following files:
/etc/rc.config.d/nfsconf
/etc/rc.config.d/namesvrs
/etc/default/autofs
/etc/default/keyserv
/etc/default/nfs
/etc/default/nfslogd
/etc/pcnfsd.conf
For more information on the setoncenv command, see setoncenv(1M).
Configuring and using NFS Netgroups
This section describes how to create and use NFS netgroups to restrict NFS access to your system.
It describes the following tasks:
Creating Netgroups in the /etc/netgroup file
To create netgroups in the /etc/netgroup file, follow these steps:
1. If you are using the local /etc/netgroup file or the NIS netgroup map for netgroups,
add entries with the following syntax to the /etc/netgroup file.
netgroup_name (host, user, NIS_domain) (host, user, NIS_domain) ...
If you are using NIS, edit the /etc/netgroup file only on the NIS master server.
2. If you are using NIS to manage your netgroups database, enter the following commands
on the NIS master server to generate the netgroup, netgroup.byhost, and
netgroup.byuser maps from the /etc/netgroup file, and push the generated maps to
the NIS slave servers:
cd /var/yp
/usr/ccs/bin/make netgroup
A netgroup can be used in most NFS and NIS configuration files, instead of a host name or a user
name. A netgroup does not create a relationship between users and hosts. When a netgroup is
used in a configuration file, it represents either a group of hosts or a group of users, but never
both.
If you are using BIND (DNS) for hostname resolution, hosts must be specified as fully qualified
domain names, for example: turtle.bio.nmt.edu.
If host, user, or NIS_domain is left blank in a netgroup, that field can take any value. If a dash
(-) is specified in any field of a netgroup, that field can take no value.
The NIS_domain field specifies the NIS domain in which the triple (host, user, NIS_domain)
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 shares a directory only to the netgroup
myfriends, only the host sage can 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 or shares a directory to the netgroup myfriends, the
NIS_domain field is ignored, and all three hosts (sage, cauliflower, and pear) can mount
the directory.
If the netgroup database contains the following netgroup,
mydomain (,,bldg1)
Configuring and using NFS Netgroups 43