Here is the new test script, with a case for "&":
#!/bin/bash

set -e
set -x

sudo apt update
sudo apt dist-upgrade -y
sudo apt install autofs samba smbclient cifs-utils -y
sudo mkdir /myshare /c /a\&b
echo "This is myshare." | sudo tee /myshare/myshare.txt
echo "This is C." | sudo tee /c/c.txt
echo "This is a&b." | sudo tee /a\&b/a\&b.txt
echo "
[myshare]
    path = /myshare
    read only = yes
    guest ok = yes

[C$]
    path = /c
    read only = yes
    guest ok = yes

[a&b]
    path = /a&b
    read only = yes
    guest ok = yes
" | sudo tee -a /etc/samba/smb.conf

echo "/cifs /etc/auto.smb --timeout=300" | sudo tee -a /etc/auto.master

sudo systemctl restart smbd nmbd autofs

echo "
Run these commands now:

cat /cifs/localhost/myshare/myshare.txt
cat /cifs/localhost/C$/c.txt
cat /cifs/localhost/C\\$/c.txt
cat /cifs/localhost/a\&b/a\&b.txt
"

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1680224

Title:
  auto.smb fails on Windows administrative shares

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/1680224/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to