NFS Services Administrator's Guide (5900-1632, August 2011)
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.
The following sample entry from the /etc/passwd file indicates that users in the netgroup animals
must be looked up in the NIS passwd database:
+@animals
The animals netgroup is defined in the /etc/netgroup file, as follows:
animals (-,mickey, ) (-,daffy, ) (-,porky, ) (-,bugs, )
The /etc/passwd file is searched sequentially. As a result, user mickey, daffy, porky, or
bugs appear before the animals netgroup in the /etc/passwd file. The NIS database is not
consulted for information on that user.
Netgroups can also be used to prevent lookups of certain users in the NIS passwd database. The
following sample entries from the /etc/passwd file indicate that if the NIS passwd database
contains entries for users in the bears netgroup, these entries cannot be used on the local system.
Any other user can be looked up in the NIS database.
-@bears
For more information on NIS, see NIS Administrator’s Guide (5991-2187).
For information on the /etc/passwd file, see passwd(4).
Using Netgroups in the /etc/group File
In the /etc/group file, netgroups can be used to indicate whether group information about
certain users must be looked up in the NIS group database.
The following sample entry from the /etc/group file indicates that group information for users
in the netgroup animals can be found in the NIS group database:
+@animals
The animals netgroup is defined in the /etc/netgroup file, as follows:
animals (-,mickey, ) (-,daffy, ) (-,porky, ) (-,bugs, )
Members of the animals netgroup can belong to groups listed in the local /etc/group file as
well as in the NIS group database. The following entries in the /etc/group file give users bugs
and daffy membership in the group wiseguys and in any group in the NIS database that
includes them as members:
wiseguys::22:bugs,daffy
+@animals
Netgroups can also be used in the /etc/group file to prevent lookups for certain users. The
bears netgroup is defined in the /etc/netgroup file, as follows:
bears (-,yogi, ) (-,smokey, ) (-,pooh, )
The following entries in the /etc/group file allow user pooh membership in the group
teddybears, but not in any other group listed in the NIS database or after the -@bears entry
in the /etc/group file:
44 Configuring and Administering NFS Services