On a Unix network, netgroups are a way to define groups of hosts or users, so that files such as /etc/exports can refer to a netgroup rather than to a long list of machines. Typically netgroups are managed by NIS; they are defined in the /etc/netgroup file on the NIS master server and accesssed by the NIS clients.

A netgroup is a set of triples of the form (hostname, username, NIS domain name). Often one or more entries in each triple will be blank, in which case that field acts as a wildcard. Netgroups are typically used in a context where only one element of each triple is relevant. In /etc/exports, username entries in a netgroup will be ignored, but in /etc/passwd, hostname entries will be ignored.

An example line in the /etc/netgroup file might be:

trusted-hosts (ender,,) (valentine,,) (jane,,)

This says that hosts ender, valentine and jane are members of the group trusted-hosts, and we could now refer to trusted-hosts in /etc/exports in order to NFS-export a filesystem to just these three hosts.

Log in or registerto write something here or to contact authors.