Description of problem: auto.smb fails to mount SMB/CIFS shares that end with a '$', but explicit entries e.g. in /etc/auto.misc work fine. It appears that the '$' character escaping isn't working. Version-Release number of selected component (if applicable): autofs-5.1.6-4.fc32.x86_64 How reproducible: 100% Steps to Reproduce: 1. Follow the steps to enable as described in /etc/auto.smb: # Put a line like the following in /etc/auto.master: # /cifs /etc/auto.smb --timeout=300 # You'll be able to access Windows and Samba shares in your network # under /cifs/host.domain/share Actual results: cd /cifs/host.domain/share$ bash: cd: /cifs/host.domain/share$: No such file or directory Expected results: ll /cifs/host.domain/testshare2/ total 0 -rwxr-xr-x. 1 username username 0 Jan 15 14:52 hello.txt drwxr-xr-x. 2 username username 0 Jan 15 14:52 'New folder' Alternatively, similar to an explicit entry in e.g. /etc/auto.misc: share$ -fstype=cifs,credentials=/etc/creds/host.domain,uid=$UID,gid=$GID ://host.domain/share\$ cd /misc/share$ ll total 0 -rwxr-xr-x. 1 username username 0 Jan 15 14:22 success.txt Additional info: $ smbclient -u=username -W=WORKGROUP -gL host.domain Enter WORKGROUP\username's password: Disk|share$|Share Disk|testshare2|Other share $ sudo automount -f -v Starting automounter version 5.1.6-4.fc32, master map auto.master using kernel protocol version 5.05 setautomntent: lookup(sss): setautomntent: No such file or directory mounted indirect on /misc with timeout 300, freq 75 seconds mounted indirect on /net with timeout 300, freq 75 seconds mounted indirect on /cifs with timeout 300, freq 75 seconds attempting to mount entry /cifs/host.domain >> awk: cmd. line:11: warning: regexp escape sequence `\&' is not a known regexp operator mounted offset on /cifs/host.domain/share$ with timeout 300, freq 75 seconds mounted offset on /cifs/host.domain/testshare2 with timeout 300, freq 75 seconds mounted /cifs/host.domain attempting to mount entry /cifs/host.domain/share$ >> 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 //host.domain/share\$ (type cifs) on /cifs/host.domain/share$ failed to mount /cifs/host.domain/share$ $ dmesg | tail [296985.595803] CIFS: Attempting to mount //host.domain/share\$ [296985.595892] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount. [296985.853442] CIFS VFS: BAD_NETWORK_NAME: \\host.domain/share [296985.869302] CIFS VFS: cifs_mount failed w/return code = -2
For what it's worth, if I apply the following change, the cifs mount works just fine: $ diff -u /etc/auto.smb.orig /etc/auto.smb --- /etc/auto.smb.orig 2020-05-29 21:07:58.462419021 +1200 +++ /etc/auto.smb 2020-05-29 21:08:38.626128477 +1200 @@ -76,7 +76,7 @@ loc = $2 # Enclose mount dir and location in quotes # Double quote "$" in location as it is special - gsub(/\\$$/, d"\\$", loc); + #gsub(/\\$$/, d"\\$", loc); gsub(/\&/,"\\\\&",loc) print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\"" } However, I have no idea what impact this change might have on shares with a '$' in the middle of the share name.
Ok, some of that commentary looks like the behviour is a bit odd. I'll have a look.
FEDORA-2020-c08e86fe8b has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-c08e86fe8b
FEDORA-2020-c08e86fe8b has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-c08e86fe8b` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c08e86fe8b See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2020-c08e86fe8b has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report.