Autofs
From Leo's Notes
This page was last edited on 31 May 2013, at 16:13.
The linux automounter.
cat /etc/auto.home
#!/bin/sh
# This can be a script.. with the username passed as the first parameter.
Username=$1
Server="file2"
Path="/export/home/$Username"
# Proof of concept.
# We can pull the file server from AD using a ldap search
# and have home directories placed in /home for all.
# This is nice because home directories are now mounted as
# needed rather than mounting the entire file server.
if [ "$Username" = "leo3" ] ; then
Server="file1"
fi
echo "-fstype=nfs4,sec=krb5,soft,rsize=8192,wsize=8192,rw $Server:$Path"