Yesterday i had to reconfigure the samba server at the office. And at the same time change some of the share names we’ve been using. One of the new names contained a space. And while setting this up on all Windows boxes i noticed no problem.
After all was finished i went to edit my fstab file so i get the new shares at boot. And after making changes to fstab i always do a simple test
sudo mount -a
This resulted in a syntax error from the fstab file
[mntent]: line 13 in /etc/fstab is bad
That’s nice. So Linux doesn’t like spaces in the share names. How strange
So i tried a few escaping sequences.
‘samba share’
“samba share”
samba\ share
Non of that seemed to work. So after a bit of searching found the solution. You can use an octal number format to express the ASCII symbol. In this case that’s ’040′. And escape it with a slash.
samba\040share








Thijs Lensselink is a 30 year old Web developer from The Netherlands.
With more then 10 years experience in the field of building and maintaining PHP
based web applications. Currently he works as a Freelance Web Developer under ...