Wednesday, January 12, 2005

Automagicly mount samba shares in Linux

I ran accros this little perl script a few months ago. Most linux distributions include 'automount' and with the help of this litle perl script you can have your cifs (Windows) shares automaticly mount and unmaount as you use them. This script would also be handy for a linux box that has more than one user in that you mount the shares per user not per machine. Anyway here's the site (however it had changed and I had to google for auto.cifs, YMMV)

[EDIT] I get confused between 'automount' and 'autofs' it appears that they are complemntary programs, you can find more info if you follow the second link.

The shares show up under /cifs. I use the following format to access the shares /cifs/hostname:share:user for example to get a listing of my home directory on crobin I would:

ls /cifs/crobin:users:mike/mike

auto.cifs perl script

http://www.mavit.pwp.blueyonder.co.uk/auto.cifs.html

Info regarding automount and autofs

http://www.linuxfocus.org/Castellano/January2001/article141.meta.html

No comments:

Post a Comment