Automatically Mount Samba shares using /etc/fstab

Posted on June 25, 2009 | Category: Informational, Linux, Networking, Ubuntu, bash


Yesterday, the power blipped at my employer. It made me realize two things that I had forgotten about: 1.) Configure the BIOS to autostart the box upon recovering from a power outage and 2.) I needed to configure my /etc/fstab to automatically mount a Samba share on the network.

Normally, you can mount a Samba share by typing in the following:

sudo smbmount //samba/share /local/mount/point -o username=name password=yourpassword

That is all fine and dandy until you reboot your machine. You need to tell the Linux distribution what to do and how to do it. Using sudo powers, append your /etc/fstab by typing in the following:
//samba/share /local/mount/point smbfs username=name,password=yourpassword 0 0

That should do it. It is a fairly simple, but necessary configuration option if you are using Samba over a network. If you have questions, let me know.

Similar Articles

Leave a Reply

CAPTCHA Image CAPTCHA Audio
Refresh Image

Design: YGoY TopOfBlogs