NFS Services Administrator's Guide
Configuring and Administering NFS Services
Configuring and Using NFS Netgroups
Chapter 2 91
• /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 -rw, -ro, or root option, as in the following
example:
share -F nfs -o rw="mail_clients" -d "home dirs" /home
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.
Using Netgroups in the /etc/hosts.equiv or $HOME/.rhosts File
In the /etc/hosts.equiv file, or in a .rhosts file in a user’s home
directory, netgroups can be used in either the host name field or the user
name field, as in the following example:
+@our_friends +@our_friends
The netgroup our_friends can be used both as host name and user
name, because it includes both host names and user names. This can be
illustrated in the following example:
our_friends (sage,sara, ) (sage,eric, ) (dill,-, )
( ,monica, )
The blank host name field in the fourth triple serves as a wildcard,
allowing users from any host on the network to log in without supplying
a password. However, only the users listed in the netgroup are given this
privileged access, because each user name field contains either a user
name or a dash.