Public bug reported:

Binary package hint: autofs

The shipped auto.smb file in autofs doesn't mount shares with spaces in
the name.

/etc/auto.master has this line:
/samba  /etc/auto.smb --timeout=30

auto.smb looks for the given machine and mounts available shares. For
example to automount the machine "oemcomputer" I would run:

$ ls /samba/oemcomputer
DOWNLOADS  MY  PHOTOS
$

The problem is the 3 shares on the Windows box are DOWNLOADS, MY
DOCUMENTS, PHOTOS. The space breaks the "My Documents" mount. smbfs is
able to cope with spaces though, this is a script problem. in
/var/log/daemon.log I saw this:

Jul  2 16:53:04 localhost automount[23163]: mount(generic): failed to
mount DOCUMENTS ://oemcomputer/MY/MY DOCUMENTS (type smbfs) on
/samba/oemcomputer/MY/MY

To fix it I used sed to escape spaces in auto.smb:

--- /etc/auto.smb       2006-07-02 17:13:10.000000000 +0200
+++ /usr/share/autofs/conffiles/auto.smb        2006-04-12 08:40:40.000000000 
+0200
@@ -18,7 +18,7 @@ done

 [ -x $SMBCLIENT ] || exit 1

-$SMBCLIENT -gNL $key 2>/dev/null| sed 's% %\\ %g' | awk -v key="$key" -v 
opts="$opts" -F'|' -- '
+$SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- '
        BEGIN   { ORS=""; first=1 }
        /Disk/  { if (first) { print opts; first=0 }; print " \\\n\t /" $2, 
"://" key "/" $2 }
        END     { if (!first) print "\n"; else exit 1 }

** Affects: autofs (Ubuntu)
     Importance: Untriaged
         Status: Unconfirmed

-- 
autofs auto.smb (samba) chokes mounting shares with spaces
https://launchpad.net/bugs/51605

--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to