NFS Services Administrator's Guide

Configuring and Administering AutoFS
Using Wildcard Characters as Shortcuts in AutoFS Maps
Chapter 3136
Using Wildcard Characters as Shortcuts in
AutoFS Maps
Consider the following guidelines while using wildcard characters as
shortcuts:
Use an asterisk (*) as a wildcard character in an indirect map, to
represent the local subdirectory if you want the local subdirectory to
be the same as the remote system name, or the remote subdirectory.
You cannot use the asterisk (*) wildcard in a direct map.
Use an ampersand (&) in a direct or indirect map as the remote
system name or the remote subdirectory. The entry in the local
directory name field will replace the ampersand. If you have used an
asterisk to represent the local subdirectory, the entry that replaces
the asterisk (*) in the local subdirectory field also replaces the
ampersand (&), in the remote system name or remote subdirectory
field.
Notes on Using Wildcard Characters as Shortcuts in
Maps
The following example illustrates the automounting of the users’ home
directories. The home directories are physically located on the NFS
server, basil, under the remote directory /export/home. On the local
NFS client, the home directories are mounted under /home.
The following line from the /etc/auto_master master map lists the
indirect map, /etc/auto_home:
# /etc/auto_master file
# local mount point map name mount options
/home /etc/auto_home -nosuid
The following line from the /etc/auto_home indirect map mounts the
users home directories on demand:
# /etc/auto_home file
# local mount point mount options remote server:directory
* basil:/export/home/&