Mount.cifs does not work without keyutils being installed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cifs-utils (Debian) |
Fix Released
|
Unknown
|
|||
cifs-utils (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
In 17.10 you could mount a cifs network-drive via
> sudo mount -t cifs //xx.yy.zz/abc t -o vers=1.
having cifs-utils (and smbclient) installed manually.
But in 18.04 (both with SMB1 and moving til SMB3) it does not work until keyutils has been installed.
The only error I see, when the cifs mount is not working, is a -2 error ("mount error(2): No such file or directory" or "CIFS VFS: cifs_mount failed w/return code = -2"):
mbmount> sudo mount -t cifs //xx.yy.zz/abc t --verbose -o vers=3,
Password for xxxxx: ********
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Smbmount> dmesg | tail
[ 89.915840] [UFW BLOCK] IN=wlp4s0 OUT= MAC=28:
[ 89.916307] [UFW BLOCK] IN=wlp4s0 OUT= MAC=28:
[ 362.580011] FS-Cache: Loaded
[ 362.592410] FS-Cache: Netfs 'cifs' registered for caching
[ 362.592495] Key type cifs.spnego registered
[ 362.592498] Key type cifs.idmap registered
[ 362.752492] CIFS VFS: BAD_NETWORK_NAME: \\xx.yy.zz\abc
[ 362.787329] CIFS VFS: cifs_mount failed w/return code = -2
[ 381.832633] CIFS VFS: BAD_NETWORK_NAME: \\xx.yy.zz\abc
[ 381.870721] CIFS VFS: cifs_mount failed w/return code = -2
> apt install keyutils
...
Smbmount> sudo mount -t cifs //xx.yy.zz/abc t --verbose -o vers=3,
>MOUNT OK HERE>
Smbmount> dmesg | tail
[ 89.916307] [UFW BLOCK] IN=wlp4s0 OUT= MAC=28:
[ 362.580011] FS-Cache: Loaded
[ 362.592410] FS-Cache: Netfs 'cifs' registered for caching
[ 362.592495] Key type cifs.spnego registered
[ 362.592498] Key type cifs.idmap registered
[ 362.752492] CIFS VFS: BAD_NETWORK_NAME: \\xx.yy.zz\abc
[ 362.787329] CIFS VFS: cifs_mount failed w/return code = -2
[ 381.832633] CIFS VFS: BAD_NETWORK_NAME: \\xx.yy.zz\abc
[ 381.870721] CIFS VFS: cifs_mount failed w/return code = -2
[ 432.322763] CIFS VFS: BAD_NETWORK_NAME: \\xx.yy.zz\abc
Keyutils were not manually installed in my 17.10 system. And I am aware of the change in default SMB versions from kernel 4.13.5 and on (cause me to insert the vers=1.0 in the mount options):
From man mount.cifs:
"The default since v4.13.5 is for the client and server to negotiate the highest possible
version greater than or equal to 2.1. In kernels prior to
v4.13, the default was 1.0. For kernels between v4.13 and v4.13.5 the default is 3.0."
And there are no fundamental change in the packages for cifs-utils, as I can see (both suggests to use keyutils!).
My 17.10:
Package: cifs-utils
Status: install ok installed
Priority: optional
Section: otherosfs
Installed-Size: 229
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 2:6.7-1
Replaces: smbfs (<< 2:4.0~rc1-1)
Depends: samba-common, libc6 (>= 2.17), libcap-ng0, libkeyutils1 (>= 1.4), libkrb5-3 (>= 1.13~alpha1+dfsg), libpam0g (>= 0.99.7.1), libtalloc2 (>= 2.0.4~git20101213), libwbclient0 (>= 2:4.0.3+dfsg1)
Suggests: keyutils, smbclient, winbind
Conffiles:
/etc/request-
/etc/request-
Description: Common Internet File System utilities
The SMB/CIFS protocol provides support for cross-platform file sharing with
Microsoft Windows, OS X, and other Unix systems.
.
This package provides utilities for managing mounts of CIFS network
file systems.
Original-
Homepage: http://
My 18.04:
Package: cifs-utils
Status: install ok installed
Priority: optional
Section: otherosfs
Installed-Size: 226
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 2:6.8-1
Replaces: smbfs (<< 2:4.0~rc1-1)
Depends: samba-common, libc6 (>= 2.17), libcap-ng0, libkeyutils1 (>= 1.4), libkrb5-3 (>= 1.13~alpha1+dfsg), libpam0g (>= 0.99.7.1), libtalloc2 (>= 2.0.4~git20101213), libwbclient0 (>= 2:4.0.3+dfsg1)
Suggests: keyutils, smbclient, winbind
Conffiles:
/etc/request-
/etc/request-
Description: Common Internet File System utilities
The SMB/CIFS protocol provides support for cross-platform file sharing with
Microsoft Windows, OS X, and other Unix systems.
.
This package provides utilities for managing mounts of CIFS network
file systems.
Original-
Homepage: http://
My system info:
My old linux, 17.10 box:
mount.cifs version: 6.7
Linux cef-leno 4.13.0-39-generic #44-Ubuntu SMP Thu Apr 5 14:25:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
My new linux: 18:04 box:
mount.cifs version: 6.8
Distributor ID: Ubuntu
Description: Ubuntu 18.04 LTS
Release: 18.04
Codename: bionic
Linux xxxxxx 4.15.0-20-generic #21-Ubuntu SMP Tue Apr 24 06:16:15 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
affects: | launchpad → ubuntu |
affects: | ubuntu → cifs-utils (Ubuntu) |
tags: | added: bionic |
Changed in cifs-utils (Debian): | |
status: | Unknown → New |
Changed in cifs-utils (Debian): | |
status: | New → Fix Released |
A small clarification of the problem: The core issue is that installing cifs-utils (and smbclient) and doing a cifs SMB3 (or SMB1) mount:
> sudo mount -t cifs //xx.yy.zz/abc t --verbose -o vers=3, username= xxxxxx, sec=ntlmv2, uid=1000, gid=1000, iocharset= utf8,domain= DD,nounix
yields a obfuscating "-2" CIFS error code:
dmesg: [ 381.870721] CIFS VFS: cifs_mount failed w/return code = -2
error text: No such file or directory" or "CIFS VFS: cifs_mount failed w/return code = -2"
Installing keyutils resolves the problem, and the mount command succeeds.
Keyutils is a suggested package in cifs-utils (and libkeyutils1 is required), but it seems that the CIFS mount is directly dependent on the keyutils package (not just the libkeyutils1 as one would expect).
The problem is NOT new in 18.04, it was basically the same in 17.10.
A suggested solution could be 1) to check CIFS for use/dependency of keyutils, and to put a better error message into the log ('keytuils missing' not just -2), or 2) to make keyutils required for the cifs-utils package.
NOTE: I still get a strange
dmesg: [ 362.752492] CIFS VFS: BAD_NETWORK_NAME: \\xx.yy.zz\abc
when the mount succeeds.
Regards
.c