Lecture 34

More on NIS

Netgroups

A netgroup is a collection of triples of form (hostname, username, domain_name).

Netgroups are used to augment the information provided in other maps and files. For example, you can create subsets of users who have various permissions.

Netgroups are intended to be matched against like patterns. A blank entry in a netgroup is a wildcard, and a - entry indicates a field that can take no value in a match.

Usually only user names or host names are used, but not both. Examples:

trusted-hosts (elgin,,), (schlitz,,)
trusted-users (,jnw,), (,bw1,)
dangerous-users (,cl0,), (,bwall,)
special-users trusted-users, dangerous-users
How do we use NFS with local system files?
The plus-sign (+) is the NIS magic token used in config files to append to maps. If you want to append the NIS group map to the group file, you place the following entry at the end of the group file:
+:*:*
The asterisks keep this entry from introducing a new group named + just in case NIS service is not running.

In the password file, you might see something like this:

root:!:0:1:Operator:/:/bin/sh
daemon:!:1:1:::
sys:!:2:2::/:/bin/sh
bin:!:3:3::/bin:
uucp:!:4:8::/var/spool/uucppublic:
+:!:0:0:::
This is the simplest form of password file appending. It adds all NIS passwd map info to the client password file.

Other possibilities include:

(/etc/netsvc.conf)

NFS

NFS clients uses the following daemons: NFS server daemmons (in addition to the client ones):

NFS file system mount control: /etc/exports tells which filesystems the server will allow clients to mount via NFS Filesystem export rules:

  1. Any local filesystem or subtree of a filesystem can be exported.

  2. No subdirectory of an exported filesystem can be exported unless it is on a separate physical device.

  3. No parent directory of an exported filesystem can be exported unless it is on a separate physical device.
Options (comma sep in /etc/exports):