Home » Informational, Linux, Networking, Ubuntu, bash

Automatically Mount Samba shares using /etc/fstab

25 June 2009 No Comment

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.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.