NFS Services Administrator's Guide

Configuring and Administering NFS Services
Configuring and Using NFS Netgroups
Chapter 2 93
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-7656).
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:
teddybears::23:pooh,paddington
-@bears