Autofs

From Leo's Notes
Revision as of 16:13, 31 May 2013 by Leo (talk | contribs) (Created page with "The linux automounter. cat /etc/auto.home <syntaxhighlight lang="bash" line start="1" enclose="div"> #!/bin/sh # This can be a script.. with the username passed as the fir...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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"