This site is currently on indefinite hiatus. For fresh, new Linux & productivity content, head on over to nathanrhale.com/linux/ and subscribe to the Linux-only feed.

File Management, Networking, Tutorials

Auto Mount Samba Shares With Fstab

June 2nd, 2009 | 4 Comments

I love Linux Journal…I should seriously subscribe. This is a great tip for anybody looking to automatically share file systems over a network via Samba & cifs. I’m probably going to use a similar solution to serve video from my main workstation to my yet-to-be-assembled, homebrew XBMC frontend in my living room.



Share and Enjoy:
  • Digg
  • del.icio.us
  • Furl
  • NewsVine
  • Slashdot
  • StumbleUpon
  • Technorati
  • Facebook
  • TwitThis
  • YahooMyWeb

4 Responses to “Auto Mount Samba Shares With Fstab”

  1. Good find. Don’t forget to run /etc/init.d/samba start on both ends after adding the line. No need to reboot. Also make sure there are no spaces between “guest,auto”. I’m use to adding a space when I type a comma, so I got an error in fstab warning because I typed it wrong the first time.

  2. Great advice, thanks for commenting!

  3. smb is probably better than it used to be, but I used to have serious issues doing it this way–a lot of times, my laptop with the server’s share mounted would hang on shutdown or just lock up Nautilus altogether.

    I used sshfs for a while for that, but have since settled on nfs (ssh was rock-solid but slow b/c it necessarily included encryption). I still have the drive shared via smb for my windows computers, but nfs, in my experience, seems a lot more reliable for mounting.

    My line in fstab is:

    192.168.2.50:/media/disk /home/jake/server nfs rsize=8192,wsize=8192,timeo=14,intr

  4. Yeah I’ve had probs in the past with Samba as well, but so far (and I’ve only tested a little bit) it seems to be working well. I’ve been wanting to learn more about NFS anyways, though, so I may end up going that route for my permanent solution. I’ll definitely be keeping you posted here.

Leave a Reply