Networking Guide
Chapter 13, Configuring the NFS automounter

The -passwd built-in map

The -passwd built-in map

The -passwd map provides a simple way of configuring automount to distribute user home directories from a single server to any client. Here is an example of how it could be used:

  1. Start automount as:

    automount /home/servername -passwd

    servername must be the name of the server on which all user home directories physically reside.

  2. On the server, ensure that the user home directories are in:

    /home/servername/username

  3. On each client intended to automount users' home directories, ensure that the home directory of each user in the /etc/passwd file is in the form:

    /home/servername/username

  4. Inform users to change directories to their home directories on a client machine by entering:

    cd /home/servername/username

To process this entry, automount:

  1. detects that the /home/servername mount point has been accessed and finds that the -passwd built-in map applies to this mount point.

  2. executes getpwnam, which searches the /etc/passwd file on the local host for an entry for user. If it finds an entry, it extracts the ``initial working directory'' field value, /home/servername/username.

  3. mounts /home/servername from servername

  4. creates a symbolic link from /tmp_mnt/home/servername/username to /home/servername/username
For this map, the tilde character () is recognized as a synonym for the username.

If you wish to distribute user home directories from multiple servers, here is one method:

  1. Create an indirect map, including entries such as:
       john      moscow:/u3/&
       bob       moscow:/u3/&
       jim       moscow:/u3/&
       pat       moscow:/u3/&
       beth      moscow:/u3/&
       louise    moscow:/u3/&
       brad      moscow:/u3/&
       pam       prague:/u3/&
       betty     prague:/u3/&
       mike      prague:/u3/&
       tom       prague:/u3/&
       joanne    prague:/u3/&
       doug      prague:/u3/&
             milan:/u3/&
    
    When reading this indirect map, automount queries milan for any username it does not find in the indirect map.

    For an explanation of the use of the ``&'' and ``'' characters, see ``Simplifying map syntax''.

  2. Create a master map with the entry:
       /home    indirect_mapname
    

  3. To have home directories mounted from the server on which they reside without needing to know the source location, inform users to enter:

    cd /home/username