The "C$" case is working with the patch, but "&" is still problematic. I tried with groovy, which has autofs 5.1.6, and a share defined like the below doesn't get mounted:
[a&b] path = /ab read only = yes guest ok = yes mount(generic): calling mount -t cifs -o guest //localhost/a\&b /cifs/localhost/a&b >> mount error(2): No such file or directory >> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log >> messages (dmesg) mount(generic): failed to mount //localhost/a\&b (type cifs) on /cifs/localhost/a&b If I remove the gsub for & in /etc/auto.smb: --- auto.smb 2020-06-03 14:35:10.280687540 +0000 +++ /etc/auto.smb 2020-06-03 14:35:20.391377469 +0000 @@ -75,7 +75,6 @@ dir = $2 loc = $2 # Enclose mount dir and location in quotes - gsub(/\&/,"\\\\&",loc) print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\"" } END { if (!first) print "\n"; else exit 1 } Then it works: ubuntu@groovy-autofs:~$ l /cifs/localhost/a\&b/ total 4.0K drwxr-xr-x 2 root root 0 Jun 3 14:27 . drwxr-xr-x 6 root root 0 Jun 3 14:35 .. -rwxr-xr-x 1 root root 23 Jun 3 14:27 ab.txt attempting to mount entry /cifs/localhost/a&b lookup_mount: lookup(program): /cifs/localhost/a&b -> -fstype=cifs,guest ://localhost/a&b parse_mount: parse(sun): expanded entry: -fstype=cifs,guest ://localhost/a&b parse_mount: parse(sun): gathered options: fstype=cifs,guest sun_mount: parse(sun): mounting root /cifs/localhost/a&b, mountpoint /cifs/localhost/a&b, what //localhost/a&b, fstype cifs, options guest do_mount: //localhost/a&b /cifs/localhost/a&b type cifs options guest using module generic mount_mount: mount(generic): calling mkdir_path /cifs/localhost/a&b mount(generic): calling mount -t cifs -o guest //localhost/a&b /cifs/localhost/a&b mount_mount: mount(generic): mounted //localhost/a&b type cifs on /cifs/localhost/a&b -- 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