Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
1  
just place your command over at /etc/rc.local or whatever your distro runs user init scripts and you're done! – Marcel Apr 9 '13 at 16:45
up vote 1 down vote accepted

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .