Marius van Witzenburg "Learned my lesson in life, now setting my action to stay in life."

4Mar/100

Using fstab to automatically mount samba drives

Using fstab to automatically mount samba drives from for example a WD ShareStore drive with CIFS and SMB share support.

My configuration runs on FreeBSD 7.

First put your password information into a special tiny file /etc/nsmb.conf

[SERVER]
addr=192.168.1.5

[SERVER:USER1]
password=PASS1

[SERVER:USER2]
password=PASS2

Next you want to add these to /etc/fstab to auto mount:

# Mount shares
//server@user1/administration /mnt/server/downloads smbfs rw,auto 0 0
//server@user1/communicatie /mnt/server/documents smbfs rw,auto 0 0
//server@user2/creative /mnt/server/music smbfs rw,auto 0 0

I hope this helps you out with easy mounting it :-)