auto.smb fails on Windows administrative shares
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autofs (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Bionic |
Fix Released
|
Medium
|
Unassigned | ||
Eoan |
Fix Released
|
Medium
|
Unassigned | ||
Focal |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
- Unable to get windows admin share (C$) mounted through autofs
- All other shares seem to work fine
- Mount / command line work fine for admin shares
[Test Case]
----
#!/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
echo "This is myshare." | sudo tee /myshare/
echo "This is C." | sudo tee /c/c.txt
echo "
[myshare]
path = /myshare
read only = yes
guest ok = yes
[C$]
path = /c
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
cat /cifs/localhost
cat /cifs/localhost
----
[Regression Potential]
- Could, in theory, brake SMB auto-mounts (specially related to $ shares)
- Minor potential (patching auto.smb file only)
- Patch is *removing* a substitution instead of adding one
[Other Info]
This is probably related to #385244.
I've been unable to get a Windows administrative share (ie. C$) mounted through Autofs. Non-administrative shares work fine. Administrative shares are accessible with the same credentials from other Windows 10 workstations and through smbclient on Ubuntu (16.04 LTS) machines. Administrative shares can even be mounted using the same credentials via mount on the command-line. However, autofs will not mount the same shares, using the same credentials, on the same Ubuntu machine.
Administrative shares are listed under /cifs/WindowsHo
-----
attempting to mount entry /cifs/WindowsHo
>> Retrying with upper case share name
>> mount error(6): No such device or address
>> Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount(generic): failed to mount //WindowsHostna
failed to mount /cifs/WindowsHo
-----
Notice that mount complains of failing to mount 'C\$' rather than 'C$'. If the bit of awk script that escapes the $ is removed, it then fails to mount 'C', which is also no good. I think if we could actually get mount to try to mount 'C$', it would work.
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
-
Diff: 121 lines (+74/-1)5 files modifieddebian/changelog (+18/-0)
debian/control (+2/-1)
debian/patches/lp1680224-fix-and-double-quoting-in-auto_smb.patch (+26/-0)
debian/patches/lp1680224-fix-double-quoting-in-auto_smb.patch (+26/-0)
debian/patches/series (+2/-0)
- Andreas Hasenack: Approve
- Canonical Server: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 105 lines (+65/-1)5 files modifieddebian/changelog (+9/-0)
debian/control (+2/-1)
debian/patches/lp1680224-fix-and-double-quoting-in-auto_smb.patch (+26/-0)
debian/patches/lp1680224-fix-double-quoting-in-auto_smb.patch (+26/-0)
debian/patches/series (+2/-0)
- Andreas Hasenack: Needs Fixing
- Canonical Server: Pending requested
-
Diff: 70 lines (+36/-1)4 files modifieddebian/changelog (+7/-0)
debian/control (+2/-1)
debian/patches/lp1680224-fix-double-quoting-in-auto_smb.patch (+26/-0)
debian/patches/series (+1/-0)
- Andreas Hasenack: Needs Fixing
- Canonical Server: Pending requested
-
Diff: 56 lines (+34/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/lp1680224-fix-double-quoting-in-auto_smb.patch (+26/-0)
debian/patches/series (+1/-0)
- Andreas Hasenack: Needs Fixing
- Canonical Server Core Reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 132 lines (+104/-0) (has conflicts)4 files modifieddebian/changelog (+11/-0)
debian/patches/lp1680224-fix-double-quoting-in-auto_smb.patch (+26/-0)
debian/patches/lp1680224-fix-offset-mount-location-multiple-expa.patch (+62/-0)
debian/patches/series (+5/-0)
Changed in autofs (Ubuntu): | |
importance: | Undecided → Medium |
tags: | added: zesty |
Changed in autofs (Ubuntu Bionic): | |
status: | New → Confirmed |
Changed in autofs (Ubuntu Eoan): | |
status: | New → Confirmed |
Changed in autofs (Ubuntu Bionic): | |
importance: | Undecided → Medium |
Changed in autofs (Ubuntu Eoan): | |
importance: | Undecided → Medium |
Changed in autofs (Ubuntu): | |
status: | Triaged → Confirmed |
Changed in autofs (Ubuntu Focal): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
description: | updated |
Changed in autofs (Ubuntu Focal): | |
status: | Confirmed → Fix Committed |
Experimenting with this a bit, shares with spaces in their names work fine, but anything with $ or & fails. Ampersands are particularly troublesome, crashing the automounter if not escaped properly.