NFS Services Administrator's Guide (B.11.31.03) August 2008

If the home directory of the user terry is configured in the /etc/passwd file as
/home/basil/terry, AutoFS mounts the remote directory /export/home/basil
from the server, basil, on the local directory /home/basil when Terry logs in.
The line with the asterisk must be the last line in an indirect map. AutoFS reads the
lines in the indirect map sequentially until it finds a match for the requested local
subdirectory. If asterisk (*) matches any subdirectory, AutoFS stops reading at the line
with the asterisk.
For example, if the /etc/auto_home map contains the following lines,
* basil:/export/home/&
charlie thyme:/export/home/charlie
AutoFS attempts to mount /export/home/charlie from the host, basil. If the
asterisk is a match for charlie, AutoFS looks no further and never reads the second
line. However, if the /etc/auto_home map contains the following lines,
charlie thyme:/export/home/charlie
* basil:/export/home/&
AutoFS mounts Charlie’s home directory from host thyme and other home directories
from host basil.
Automounting Home Directories
To automount users’ home directories, follow these steps:
1. Ensure that the systems where the users’ home directories are located are set up
as NFS servers and are exporting the home directories. For more information on
configuring a system as an NFS server, see “Configuring and Administering an
NFS Server” (page 27).
2. In the /etc/passwd file on the NFS clients, configure the home directory of each
user as the NFS mount-point, where the users home directory is mounted. For
example, if home directories are mounted under /home, Claire’s home directory
will be configured as /home/claire in the /etc/passwd file.
3. If you are using local files for maps, create a file called /etc/auto_home on the
NFS clients, and add an entry for each user.
sammy thyme:/export/home/& -nosuid
The ampersand (&) character takes the value of the user name in each line. User
Sammy’s home directory is physically located on host thyme in
/export/home/sammy.
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:
92 Configuring and Administering AutoFS