http://znogger.blogspot.com/2010/05/solaris-automatic-creation-of-home-dirs.html
add a line to /etc/auto_master
echo "/export/home/ad /etc/auto_homedir" >> /etc/auto_master
create the /etc/auto_homedir script
root@ueq2szsapapt01:~# cat /etc/auto_homedir
#!/bin/bash
(
HOMEDIRPATH=/export/home/ad
PHYSICALDIRPATH=/export/home/.ad
HOMEDIRGROUP=""
hdir=~$1
E=getent passwd $1 |wc -l
if [ $E -e 0 ]; then
exit
fi
sanitized=echo $1 | sed 's/\//_/g'
phdir="$PHYSICALDIRPATH/${sanitized}"
if [ -d "$phdir" ]; then
echo "localhost:$phdir"
exit
fi
mkdir -p $phdir
chown "$1":"$HOMEDIRGROUP" $phdir
echo "localhost:$phdir"
exit
) | tee /tmp/autohome.log
Set sticky bit and execute on the script
chmod +t+x /etc/auto_homedir
Restart the automounter
svcadm restart autofs
Create the base mountpoints
mkdir -p /export/home/ad
mkdir -p /export/home/.ad