Accessing Windows or Samba shares using AutoFS

Thu Dec 14 04:14:16 -0800 2006
manage

You already installed Linux on your networked desktop PC and now you want to work with files stored on some other PCs in your network. This is where autofs comes into play.

This tutorial shows how to configure autofs to use CIFS to access Windows or Samba shares from Linux Desktop PCs. It also includes a tailored configuration file.

Accessing Windows or Samba shares using AutoFS
Thu Dec 14 18:29:36 -0800 2006
manage
autofs just seems like such a huge nasty hack to me. Does anyone know if there are any advantages to doing this rather than just putting one line in /etc/fstab?
Accessing Windows or Samba shares using AutoFS
Thu Dec 14 18:58:41 -0800 2006
manage
I've never used it but from the article it seems that it would be usefull from a sysadmin/desktop support position - instead of
$ sudo mount -t smbfs //cluelessnoob/c$ /mnt/tmp -o username=bofh
Password:
$ rm -rf /mnt/tmp/Documents\ And\ Settings/noob/My\ Documents


You could simply do

$ rm -rf /cifs/cluelessnoob/c$/Documents\ and\ Settings/noob/My\ Documents

Much more efficient that way.
Accessing Windows or Samba shares using AutoFS
Thu Dec 14 22:26:45 -0800 2006
manage
While it's an nfs mount and not samba (a samba mount would look nearly identical)

# grep nfs /etc/fstab                                                                                                                                               
thor:/home/jamesb/share /fileserv nfs rw,nodev,nosuid,noauto 0 0
# mount /fileserv
# rm -rf /fileserv/somedirectory

I'm still not seeing the advantage.
Accessing Windows or Samba shares using AutoFS
Thu Dec 14 23:58:42 -0800 2006
manage

The advantage of AutoFS comes when you have several/many servers, and/or you're using a laptop that is not always connected to the LAN.

Putting everything in fstab means you either mount everything on boot-up (and depend on the kernel to handle disconnects) or mount things manually. AutoFS allows you mount filesystems (not just network filesystems) on demand, simply by accessing a directory or file.

Accessing Windows or Samba shares using AutoFS
Fri Dec 15 06:18:29 -0800 2006
manage
That makes a bit of sense I guess. Thanks for the quick explanation.