NFS Services Administrator's Guide (B.11.31.02) January 2008
4. If you are using local files for maps, add the following entry to the AutoFS master map,
/etc/auto_master, on the NFS clients:
/home /etc/auto_home
5. Enter the following command on each NFS client that uses these maps to force AutoFS to
reread the maps:
/usr/sbin/automount
Example of Automounting a User’s Home Directory
User Howard’s home directory is located on the NFS server, basil, where it is called
/export/home/howard. Each client in the network has the following entry in the /etc/passwd
file on all the systems in the network:
howard:*:700:70:Howard:/home/howard:/usr/bin/ksh
When Howard logs in to any NFS client, AutoFS recognizes /home as an AutoFS mount-point,
because it is configured in the master map, as follows:
/home auto_home
AutoFS reads the auto_home map to find out how to mount Howard’s home directory. It finds
the following line:
howard basil:/export/home/& -nosuid
AutoFS substitutes howard for the ampersand (&) character in that line:
howard basil:/export/home/howard -nosuid
AutoFS mounts /export/home/howard from server basil to the local mount-point
/home/howard on the NFS client. Figure 3-7 illustrates this configuration.
Figure 3-7 Home Directories Automounted with Wildcards
NFS server Basil Local NFS Client
/
/home
/howard
/
/home
/howard
/export
.profile mystuff
.profile mystuff
Special Maps
There are two types of special maps: -hosts and -null.
By default, the -hosts map is used with the /net directory and assumes that the map entry is
the hostname of the NFS server. The automountd daemon dynamically creates a map entry
from the server's list of exported filesystems. For example, a reference to /net/Casey/usr
initiates an automatic mount of all the exported filesystems from Casey which can be mounted
by the client. References to the directory under /net/Casey refers to the corresponding directory
relative to the root directory of Casey.
The -null map, when included in a map entry, cancels a map for the directory indicated. This
is especially useful in the AutoFS master map, /etc/auto_master, for cancelling entries that
would otherwise be inherited from the +auto_master include entry. To be effective, the -null
entry must be inserted before the included map entry. For information on how to include a map
in another map, see “Including a Map in Another Map” (page 78).
Special Maps 73