I'm trying to automount smbfs shares with spaces in their names, and
it doesn't seem to be working.
First, some background - I had a hellish time trying to get
"-fstype=smbfs" to work with samba 2.0.5 - it seems that as of this
release or a little ways back, the smbmount syntax has become
incompatible with autofs's mount_smbfs.so, but a mount.smb script
(which gets called by /bin/mount) has been added to allow smb
fileshares to work with a normal-looking mount command.
$#this works
$mount -t smb //server/share /mnt/temp
$#these work too
$mount -t smb //'server 2'/share /mnt/temp
$mount -t smb //server\ 3/share /mnt/temp
$cat /etc/auto.smb
test1 -fstype=smb ://server/share
test2 -fstype=smb ://'server 2'/share
test3 -fstype=smb ://server\ 3/share
Only the test1 entry works; the others give bad syslog errors.
automount[3686]: attempting to mount entry /.autosmb/test2
automount[5444]: >> sh: unexpected EOF while looking for `''
automount[5444]: >> sh: -c: line 2: syntax error
automount[5444]: >> mount failed
automount[3686]: attempting to mount entry /.autosmb/test3
automount[5463]: >> Added interface ip=128.42.159.72 bcast=128.42.159.255
nmask=255.255.255.0
automount[5463]: >> Usage: smbmount //server/share mountpoint [options ...]
automount[5463]: >> Version 2.0.5a
automount[5463]: >> ^I-d debuglevel set the debuglevel
automount[5463]: >> ^I-n netbios name. Use this name as my netbios name
automount[5463]: >> ^I-N don't ask for a password
automount[5463]: >> ^I-I dest IP use this IP to connect to
automount[5463]: >> ^I-E write messages to stderr instead of stdout
automount[5463]: >> ^I-U username set the network username
automount[5463]: >> ^I-W workgroup set the workgroup name
automount[5463]: >> ^I-t terminal code terminal i/o code {sjis|euc|jis7|jis8|junet|hex}
Trying to escape whitespace in the share names doesn't work either.
Anyway, as best as I can figure out, there is no way to escape spaces
in the autofs map files. Before anyone asks, giving the servers
different netbios names and/or different share names isn't an option
in most cases.
Any help? I'm working on implementing the equivalent of a /net
directory for browsing SMB shares, and this is my last obstacle.
---
Roy Stogner