Go to main content

Trusted Extensions Configuration and Administration

Exit Print View

Updated: March 2019

How to Enable Users to Access Their Remote Home Directories by Configuring the Automounter on Each Server

In this procedure you run a script that creates a mount point for home directories on each NFS server. Then, you modify the auto_home entry at the label of the server to add the mount point. Then, users can log in.

Before You Begin

The home directory servers for your Trusted Extensions domain are configured as LDAP clients. User accounts have been created on the LDAP server by using the useradd command with the –S ldap option. You must be in the root role.

  1. Write a script that creates a home directory mount point for every user.

      The sample script makes the following assumptions:

    • The LDAP server is a different server from the NFS home directory server.

    • The client systems are also different systems.

    • The hostname entry specifies the external IP address of the zone, that is, the NFS home directory server for its label.

    • The script will be run on the NFS server in the zone that serves clients at that label.

    for j in $(getent passwd|tr ' ' _); do
    uid=$(echo $j|cut -d: -f3)
    if [ $uid -ge 100 ]; then
    home=$(echo $j|cut -d: -f6)
    if [[ $home == /home/* ]]; then
    user=$(echo $j|cut -d: -f1)
    echo Updating home directory for $user
    usermod -md ${hostname}:$homedir -S $scope $user
    mp=$(mount -p|grep  " $homedir zfs" )
    dataset=$(echo $mp|cut -d" " -f1)
    if [[ -n $dataset ]]; then
    zfs set sharenfs=on $dataset
  2. On each NFS server, run the preceding script in the labeled zone that serves clients at that label.