mounting share in fstab error

2

I've been successfully able to mount a share on my Ubuntu Server using this command:

sudo mount -t cifs //IPTOSHARE/DriveLetter$/Folder/"Folder Space" /mnt/Folder/"Folder Space" -o username="",domain=""

However this only mounts the share until reboot.

I have tried to mount in fstab:

//IPTOSHARE/DriveLetter$/Folder/"Folder Space" /mnt/Folder/"Folder Space" cifs credentials=/home/username/.smbcredentials,uid=username,gid=sharegroup 0 0

However unlike the successful temporary mount, fstab does not like the following characters that WORKED on the temporary mount: $ ""

DriveLetter$ -Hidden share "Folder Space" - Folder that has a space in it. I know this is NOT idea but its what I have to work with.

Why can I successfully create a temporary share, but not a permanent share using fstab?

Benjamin Jones

Posted 2013-04-09T16:03:00.497

Reputation: 526

1just place your command over at /etc/rc.local or whatever your distro runs user init scripts and you're done! – Marcel – 2013-04-09T16:45:00.440

Answers

1

What @Marcel suggests would work, but isn't best practice.

To use spaces in your fstab file, you need to use the octal ascii notation for a space:

\040

So for your uses, it would look like:

//IP/Drive/Folder/Folder\040Name /mnt/Folder/Folder\040Name cifs creds... 0 0

Try adding that, then running:

sudo mount -a

And post back specific errors mentioned if they exist.

nerdwaller

Posted 2013-04-09T16:03:00.497

Reputation: 13 366