 |
» |
|
|
 |
To automount home directories, you need to perform the following
steps: Make sure the machines where users’ home directories
are located are set up as NFS servers. In addition, make sure the
machines are exporting the home directories. See the “Configuring
and Administering an NFS Server” section of NFS
Services Administrator’s Guide. In the /etc/passwd file on the NFS clients, or in the NIS passwd map or the NIS+ passwd table, configure the home directory of each user
as the NFS mount point where the user’s home directory
will be 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. If you are using local files for your AutoFS maps,
create a file called /etc/auto_home on the NFS clients, and add a line into the file
for each user; see the following example: sammy thyme:/export/home/& -nosuid |
The ampersand (&) character takes the value of the
user name in each line. In the previous example, user sammy’s home directory is physically located
on the thyme host in /export/home/sammy. If you are using NIS to manage your AutoFS maps, add the line
into the /etc/auto_home file on the NIS master server. See the “Configuring
and Administering NIS” chapter of NFS Services Administrator’s
Guide. If you are using local files for your AutoFS maps,
add the following line to AutoFS master map, /etc/auto_master, on the NFS clients: If you are using NIS to manage your AutoFS maps, add the line
into the /etc/auto_master file on the NIS master server. If you are using NIS to manage your AutoFS maps,
issue the following commands on the NIS master server to rebuild
the maps and push them to slave servers: cd /var/yp /usr/ccs/bin/make auto_master |
To force AutoFS to reread the maps, issue the following
command on each NFS client that will use these AutoFS maps:
Before you can automount home directories, you must enable
AutoFS. See “Enabling
Enhanced AutoFS”. 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. On all the machines in the network, Howard has
the following entry in the /etc/passwd file: howard:*:700:70:Howard:/home/howard:/usr/bin/ksh |
When Howard logs on to any NFS client, AutoFS recognizes /home as an AutoFS mount point because it is configured
in the master map as follows: AutoFS reads the auto_home map to determine how to mount Howard’s home
directory. It finds the following line: howard basil:/export/home/& -nosuid |
AutoFS substitutes howard with the ampersand (&) character in that line: howard basil:/export/home/howard -nosuid |
AutoFS mounts /export/home/howard from the basil server to the local mount point /home/howard on the NFS client. Figure 3-2 “Home
Directories Automounted with Wildcards” illustrates this configuration.
|