I commented in the MP, but let me add something here too.
Groovy/focal with autofs 5.1.6-2 (same package as debian) show the same problem. And the packages from the attached MP for bionic still won't work:
Jun 1 20:05:15 bionic-autofs kernel: [ 751.949808] CIFS VFS: BAD_NETWORK_NAME: \\bionic-autofs\C$dollar
I don't think that "dollar" was meant to be literal. Actually, it doesn't look like any escaping is needed:
root@bionic-autofs:~# mkdir /manual-cifs
root@bionic-autofs:~# mount -t cifs //bionic-autofs/C$ /manual-cifs -o user=ubuntu
Password for ubuntu@//bionic-autofs/C$: ******
root@bionic-autofs:~# l /manual-cifs/
this-is-c.txt*
and
root@bionic-autofs:~# umount /manual-cifs
root@bionic-autofs:~# mount -t cifs //bionic-autofs/C\$ /manual-cifs -o user=ubuntu
Password for ubuntu@//bionic-autofs/C$: ******
root@bionic-autofs:~# l /manual-cifs/
this-is-c.txt*
But C\\$ won't work:
root@bionic-autofs:~# mount -t cifs //bionic-autofs/C\\$ /manual-cifs -o user=ubuntu
Password for ubuntu@//bionic-autofs/C$: ******
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@bionic-autofs:~#
By removing the $ gsub() handling in auto.smb, it works:
root@focal-autofs:~# /etc/auto.smb focal-autofs
awk: cmd. line:9: warning: regexp escape sequence `\&' is not a known regexp operator
-fstype=cifs,uid=$UID,gid=$GID,credentials=/etc/creds/focal-autofs \
"/print$" "://focal-autofs/print$" \
"/myshare" "://focal-autofs/myshare" \
"/C$" "://focal-autofs/C$"
root@focal-autofs:~# l /cifs/focal-autofs
'C$'/ myshare/ 'print$'/
root@focal-autofs:~# l /cifs/focal-autofs/C\$/ <--- even used tab complete here
this-is-c.txt*
root@focal-autofs:~#
Also works without tab-completion:
root@focal-autofs:~# systemctl restart autofs
root@focal-autofs:~# l /cifs/focal-autofs
'C$'/ myshare/ 'print$'/
root@focal-autofs:~# l /cifs/focal-autofs/C$
this-is-c.txt*
root@focal-autofs:~#
Maybe it's time to confirm with upstream, since groovy has the same issue still and is the latest version?
I commented in the MP, but let me add something here too.
Groovy/focal with autofs 5.1.6-2 (same package as debian) show the same problem. And the packages from the attached MP for bionic still won't work: autofs\ C$dollar
Jun 1 20:05:15 bionic-autofs kernel: [ 751.949808] CIFS VFS: BAD_NETWORK_NAME: \\bionic-
I don't think that "dollar" was meant to be literal. Actually, it doesn't look like any escaping is needed:
root@bionic- autofs: ~# mkdir /manual-cifs autofs: ~# mount -t cifs //bionic-autofs/C$ /manual-cifs -o user=ubuntu //bionic- autofs/ C$: ****** autofs: ~# l /manual-cifs/
root@bionic-
Password for ubuntu@
root@bionic-
this-is-c.txt*
and
root@bionic- autofs: ~# umount /manual-cifs autofs: ~# mount -t cifs //bionic-autofs/C\$ /manual-cifs -o user=ubuntu //bionic- autofs/ C$: ****** autofs: ~# l /manual-cifs/
root@bionic-
Password for ubuntu@
root@bionic-
this-is-c.txt*
But C\\$ won't work: autofs: ~# mount -t cifs //bionic- autofs/ C\\$ /manual-cifs -o user=ubuntu //bionic- autofs/ C$: ****** autofs: ~#
root@bionic-
Password for ubuntu@
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
root@bionic-
By removing the $ gsub() handling in auto.smb, it works:
root@focal- autofs: ~# /etc/auto.smb focal-autofs cifs,uid= $UID,gid= $GID,credential s=/etc/ creds/focal- autofs \ autofs/ print$" \ autofs/ myshare" \ autofs/ C$"
awk: cmd. line:9: warning: regexp escape sequence `\&' is not a known regexp operator
-fstype=
"/print$" "://focal-
"/myshare" "://focal-
"/C$" "://focal-
root@focal- autofs: ~# l /cifs/focal-autofs autofs: ~# l /cifs/focal- autofs/ C\$/ <--- even used tab complete here autofs: ~#
'C$'/ myshare/ 'print$'/
root@focal-
this-is-c.txt*
root@focal-
Also works without tab-completion: autofs: ~# systemctl restart autofs autofs: ~# l /cifs/focal-autofs autofs: ~# l /cifs/focal- autofs/ C$ autofs: ~#
root@focal-
root@focal-
'C$'/ myshare/ 'print$'/
root@focal-
this-is-c.txt*
root@focal-
Maybe it's time to confirm with upstream, since groovy has the same issue still and is the latest version?