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.
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.
#!/bin/sh hostname=$(hostname) scope=ldap 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 homedir=/export/home/$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 fi fi fi done