Permanently Mount SMB Shares on Ubuntu

As a newbie to my MBLive3T and to Linux I could use some assistance from someone more knowledgeable about both.  I am running Ubuntu 11.10 Desktop and have Samba working properly.  I have added the following line to the end of /etc/fstab to attempt to establish a permanent mount of my “Shared Music” in the Public share.

//mybooklive1/public/shared music/ /media/shares cifs username=username,password=password 0 0

  • where the actual username and password are entered

I have also tried it with the IP address as follows:

//192.168.0.102/public/shared music/ /media/shares cifs username=username,password=password 0 0

When I execute sodo mount -a

I get the message

[mntent]: line 14 in /etc/fstab is bad

Whe I look at Dolphin I see a mount that looks like

Public/Shared on //192.168.0.102

This makes me think that Linux does not like the default share folder name “Shared Music” due to the space, or maybe there are things that I do not understand about the MBLive3T file structure.

Any help would be appreciated.  Thanks.

try

shared\ music

That backslash means that the next character is going to be a space

Thanks for the suggestion but now when I perform sudo mount -a

I get the following error message:

[mntent]: line 14 in /etc/fstab is bad

Resolved the space problem by using the escape code \040

tbrewer wrote:

Resolved the space problem by using the escape code \040

Yup…  That’s about the only fix I know of…  the “fstab” syntax is about as arcane as anything I’ve ever seen.

It needs to step into the '70’s and allow escaped spaces, or quoted literals.

1 Like