From Lolly's Wiki
Jump to navigationJump to search

Automount home directories


# Include /etc/auto.master.d/*.autofs


/home   /etc/auto.master.d/


Mount homes from different locations.

*       :/data/home/&

or from a server that supports NFSv4.1:

*       -proto=tcp,vers=4.1

The asterisk marks any dir in /home/* should be matched by this rule. The ampers and is replaced by the part which was matched by *. So if you enter /home/a the automounter searches local for /data/home/a which will be mounted when found.

# cd /home/a
# mount -v | grep /home/a
/data/home/a on /home/a type none (rw,bind)

For another /home/b which is on the nfs server it looks like this:

# cd /home/b
# mount -v | grep /home/b on /home/b type nfs (rw,addr=



/data/cifs	/etc/auto.master.d/


mycifsshare -fstype=cifs,rw,credentials=/etc/samba/mycifsshare_credentials,uid=<myuser>,forceuid ://