NFS Services Administrator's Guide (B.11.31.03) August 2008
this netgroup in an [access_list] argument in the /etc/dfs/dfstab file, any
host can access the shared directory. If a netgroup is used strictly as a list of users, it is
better to put a dash in the host field, as follows:
administrators (-,jane, ) (-,art, ) (-,mel, )
The dash indicates that no hosts are included in the netgroup.
The trusted_hosts and administrators netgroups can be used together in the
/etc/hosts.equiv file, as follows:
+@trusted_hosts +@administrators
The first netgroup is read for host names, and the second is read for user names. Users
in the administrators netgroup can log in to the local host from any host in the
trusted_hosts netgroup without supplying a password.
The two netgroups can be combined into one, as follows:
goodguys (sage,jane, ) (basil,art, ) (thyme,mel, )
If the two netgroups are combined this way, the same netgroup can be used as both
the host name and the user name in the /etc/hosts.equiv file, as follows:
+@goodguys +@goodguys
The first occurrence of it is read for the host name, and the second occurrence is read
for the user name. No relationship exists between the host and user in any of the triples.
For example, user jane may not even have an account on host sage.
A netgroup can contain other netgroups, as in the following example:
root-users (dill,-, ) (sage,-, ) (thyme,- , ) (basil,-, )
mail-users (rosemary, , ) (oregano, , ) root-users
The root-users netgroup is a group of four systems. The mail-users netgroup
uses the root-users netgroup as part of a larger group of systems. The blank space
in the third field of each triple indicates that the netgroup is valid in any NIS domain.
Using Netgroups in Configuration Files
Netgroups may be used in the following files:
• /etc/dfs/dfstab, in the [access_list], -rw, -ro, and root list
• /etc/hosts.equiv or $HOME/.rhosts, in place of a host name or user name
• /etc/passwd, to instruct processes whether to look in the NIS password database,
for information about the users in the netgroup
• /etc/group, to instruct processes whether to look in the NIS group database, for
information about the users in the netgroup
The following sections explain how to use netgroups in configuration files.
Using Netgroups in the /etc/dfs/dfstab File
In the /etc/dfs/dfstab file, netgroups can be used in the list of NFS clients following
the [access_list], -rw, -ro, or root option, as in the following example:
Configuring and Using NFS Netgroups 61