3

I'm trying to mount a smb network share in fstab on FreeBSD, which works fine for a share without spaces, but fails if a space is in the name. I have replaced the space with \040 which is what everything on google has said, but that didn't help.

Share name I'm trying to mount is "Data Backups".

Share name as written in fstab that doesn't work: //USERNAME@COMPUTER/Data\040Backups

Any suggestions?

4 Answers4

3

http://ubuntuforums.org/archive/index.php/t-27823.html

"//192.168.1.103/Full\040Movies" <- Did Work for mounting //192.168.1.103/Full Movies

0

You should use %20 in place of spaces:

//USERNAME@COMPUTER/Data%20Backups

I don't really know if this works on all BSDs out there, as it was only tested on Mac OS 10.7.4. Hopefully it is close enough to use the same syntax.

I know I'm a little late to the party but it may be useful for someone in the future.

devius
  • 447
  • 5
  • 15
0

Mmh, shouldn't that be something like the following in fstab? I cannot imagine Samba works much different on BSD's than it does on Linux:

//COMPUTER/"Data Backups" /mnt/share smbfs username=username,password=password 0 0

I'm not sure the "Data Backups" would work: you might just need to escape the space.

wzzrd
  • 10,269
  • 2
  • 32
  • 47
  • Man for mount_smbfs says to mount in fstab using the following example: //guest@samba/public /smb/public smbfs rw,noauto 0 0 So thats what I based it on. The username and mounting works when I use a different share name that has no space, so the syntax is good. The space is just what kills it. I've tried the following with no luck: "//USER@COMPUTER/Data Backups" //USER@COMPUTER/"Data Backups" //USER@COMPUTER/Data\ Backups //USER@COMPUTER/Data\040Backups I just can't think of anymore combinations to try out. –  Nov 18 '09 at 14:32
  • Create a share without space =). That share will link(make it) to "Data Backups". Users won't see any difference =). – TiFFolk Nov 18 '09 at 15:07
  • No access to the server itself, I can only work through the share as is. For now, I'm making a startup script to invoke "mount_smbfs" which does work with the space. If anyone knows of a way to make fstab work though, please feel free to share. –  Nov 18 '09 at 15:11
0

I don't think you can have spaces within a field of fstab. The format of the file is pretty simplistic, and its manpage mentions:

Each file system is described on a separate line; fields on each line are separated by tabs or spaces.

So you are pretty much stuck with a non-fstab solution if the name of the share is out of your control.

gkeramidas
  • 109
  • 2