NFS Services Administrator's Guide (B.11.31.04) March 2009
[access_list]=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.
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.
Netgroups can also be used to deny privileged access to certain hosts or users in the
/etc/hosts.equiv or $HOME/.rhosts file, as in the following example:
+ -@vandals
The plus (+) sign is a wildcard in the /etc/hosts.equiv or $HOME/.rhosts file
syntax, allowing privileged access from any host in the network. The netgroup vandals
is defined as follows:
vandals ( ,pat, ) ( ,harriet, ) ( ,reed, )
All users except those listed in the vandals netgroup can log in to the local system
without supplying a password from any system in the network.
CAUTION: Users who are denied privileged access in the /etc/hosts.equiv file
can be granted privileged access in a user’s $HOME/.rhosts file. The $HOME/.rhosts
file is read after the /etc/hosts.equiv file and overrides it.
For more information, see hosts.equiv(4).
Using Netgroups in the /etc/passwd File
In the /etc/passwd file, netgroups can be used to indicate whether user information
must be looked up in the NIS passwd database.
60 Configuring and Administering NFS Services