NFS Services Administrator's Guide (B1031-90072, March 2011)

AutoFS mounts /export/home/howard from server basil to the local mount-point
/home/howard on the NFS client. Figure 12 illustrates this configuration.
Figure 12 Home Directories Automounted with Wildcards
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 72).
Automounting All Exported Directories from Any Host Using the -hosts Map
To automount all exported directories using the -hosts map, follow these steps:
1. If you are using local files for AutoFS maps, use an editor to add the following entry to the
/etc/auto_master master map file:
/net -hosts -nosuid,soft,nobrowse
NOTE: The nobrowse option in the local default master map file for a newly installed system
is specified for the /net map.
If you are using NIS to manage AutoFS maps, add the previous entry to the master map file
on the NIS master server. Rebuild the map and push it out to the slave servers. For more
information on NIS and NIS maps, see the NIS Administrator’s Guide (5991-2187). If you
are using LDAP, add the entry to the LDAP directory.
2. On each host that uses the map you modified, enter the following command to force AutoFS
to read the modified map:
/usr/sbin/automount
Special Maps 67