Public bug reported:

When attempting to mount a CIFS/SMB share without cifs-utils installed,
mount silently falls back to kernel-only CIFS mounting. This causes
credentials files to fail without any indication of the root cause.

Example - this command fails:
sudo mount -t cifs //192.168.XX.XX/Share ./location \
  -o credentials=/home/user/.smbcredentials,vers=3.1.1

Error output:
mount: /home/user/mnt/location: cannot mount //192.168.XX.XX/Share read-only.
       dmesg(1) may have more information after failed mount system call.

dmesg shows only:
[11514.313424] CIFS: VFS: cifs_mount failed w/return code = -13

Increased logging on the server shows attempts at anonymous
authentication.

However, the same mount command works fine when credentials are provided inline:
sudo mount -t cifs //192.168.XX.XX/Share ./location \
  -o username=user,password=pass,vers=3.1.1

This misleading behavior makes it appear that CIFS mounting is working
correctly, when in reality the credentials file parsing requires the
mount.cifs helper from cifs-utils.

The fix is simple, which is to install cifs-utils, but the very vague
error messages provide no indication of this. You tend to chase your
tail looking at issues with auth methods or wondering if something is
wrong with the credential file.

Suggestion: When mount detects a CIFS mount attempt without mount.cifs 
available, it should either:
1. Warn the user: "Warning: mount.cifs helper not found, using kernel-only CIFS 
mounting. Credentials file parsing may not work. Install cifs-utils package."
2. Or fail explicitly: "Error: cifs-utils not installed. Install with: sudo apt 
install cifs-utils"

** Affects: util-linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: cifs mount samba

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

Title:
  mount -t cifs should warn when cifs-utils is not installed

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/2135819/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to