22.5.4.1 Configuring an NIS Client to Use Automount Maps

If you have configured an automount map for auto.home in NIS, you can configure an NIS client to mount the users' home directories when they log in.

To configure an NIS client to automount users' home directories:

  1. Install the autofs package:

    # yum install autofs 
  2. Create an /etc/auto.master file that contains the following entry:

    /nethome      /etc/auto.home
  3. Verify that the auto.home map is available:

    # ypcat -k auto.home
    *    -rw,sync    nfssvr:/nethome/&

    In this example, the map is available. For details of how to make this map available, see Section 22.5.3, “Adding User Accounts to NIS”.

  4. If the auto.home map is available, edit the file /etc/auto.home to contain the following entry:

    +auto.home

    This entry causes the automounter to use the auto.home map.

  5. Restart the autofs service, and configure the service to start following a system reboot:

    # service autofs restart
    # chkconfig autofs on

    The autofs service creates the directory /nethome. When a user logs in, the automounter mounts his or her home directory under /nethome.

    If the owner and group for the user's files are unexpectedly listed as the anonymous user or group (nobody or nogroup) and all_squash has not been specified as a mount option, verify that the Domain setting in /etc/idmapd.conf on the NFS server is set to the DNS domain name. Restart the NFS services on the NFS server if you change this file.