mounting CIFS share failure (cifs_mount failed w/return code = -2)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cifs-utils (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
HOST: Kubuntu 16.04.3 LTS
LOCALHOST: Kubuntu 17.10
The system is in an working Active Directory environment (realm, sssd). But mounting on commandline using a kerberos ticket is failing:
mount -t cifs -o user=USER,
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
journalctl/syslog:
CIFS VFS: Send error in SessSetup = -2
CIFS VFS: cifs_mount failed w/return code = -2
smbclient -k -U USER //HOST/share
is working and I can list all files in the share.
smbclient -U USER //HOST/share
is working too (without kerberos!) and I can list all files in the share.
using a filemanager with cifs like dolphin is working!
I can open smb://HOST/share with dolphin without a password (SSO).
Using mount.cifs without kerberos is not working too (in contrast to dolphin and smbclient):
mount -t cifs -o user=USER,
Password for USER@//HOST/share: *************
mount error(5): Input/output error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
journalctl/syslog:
Status code returned 0xc000005e STATUS_
CIFS VFS: Send error in SessSetup = -5
CIFS VFS: cifs_mount failed w/return code = -5
Additional tests show me that it is working the other way round:
mounting Kubuntu 17.10 from Kubuntu 16.04.3 with kerberos (same machines) is working!
There has to be a change, that is not working anymore with a newer Ubuntu than 16.04.
Mounting on commandline without kerberos is not working too and I get the same error as above in syslog:
CIFS VFS: Send error in SessSetup = -5
CIFS VFS: cifs_mount failed w/return code = -5
Anyway, cifs mounting with kerberos stops working in newer distributions, which has to be fixed!
LOCALHOST: Kubuntu 17.10
=======
# dpkg -l | grep -e krb5 -e samba -e smb -e sssd
ii krb5-config 2.6 all Configuration files for Kerberos Version 5
ii krb5-locales 1.15.1-2 all internationaliz
ii krb5-user 1.15.1-2 amd64 basic programs to authenticate using MIT Kerberos
ii libgssapi-
ii libkrb5-
ii libkrb5-3:amd64 1.15.1-2 amd64 MIT Kerberos runtime libraries
ii libkrb5support0
ii libsmbclient:amd64 2:4.6.7+
ii libsmbios2v5 2.3.1-0ubuntu2 amd64 Provide access to (SM)BIOS information -- dynamic library
ii python-samba 2:4.6.7+
ii samba 2:4.6.7+
ii samba-common 2:4.6.7+
ii samba-common-bin 2:4.6.7+
ii samba-dsdb-modules 2:4.6.7+
ii samba-libs:amd64 2:4.6.7+
ii samba-vfs-modules 2:4.6.7+
ii smb4k 2.0.1-1 amd64 Samba (SMB) share advanced browser
ii smbclient 2:4.6.7+
ii sssd 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- metapackage
ii sssd-ad 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- Active Directory back end
ii sssd-ad-common 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- PAC responder
ii sssd-common 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- common files
ii sssd-dbus 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- D-Bus responder
ii sssd-ipa 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- IPA back end
ii sssd-krb5 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- Kerberos back end
ii sssd-krb5-common 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- Kerberos helpers
ii sssd-ldap 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- LDAP back end
ii sssd-proxy 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- proxy back end
ii sssd-tools 1.15.3-2ubuntu1 amd64 System Security Services Daemon -- tools
HOST: Kubuntu 16.04.3 LTS
=======
# dpkg -l | grep -e krb5 -e samba -e smb -e sssd
ii krb5-config 2.3 all Configuration files for Kerberos Version 5
ii krb5-locales 1.13.2+
ii krb5-user 1.13.2+
ii libgssapi-
ii libkrb5-
ii libkrb5-3:amd64 1.13.2+
ii libkrb5support0
ii libsmbclient:amd64 2:4.3.11+
ii python-samba 2:4.3.11+
ii samba 2:4.3.11+
ii samba-common 2:4.3.11+
ii samba-common-bin 2:4.3.11+
ii samba-dsdb-modules 2:4.3.11+
ii samba-libs:amd64 2:4.3.11+
ii samba-vfs-modules 2:4.3.11+
ii smb4k 1.1.2-1 amd64 Samba (SMB) share advanced browser for KDE
ii smbclient 2:4.3.11+
ii sssd 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- metapackage
ii sssd-ad 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- Active Directory back end
ii sssd-ad-common 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- PAC responder
ii sssd-common 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- common files
ii sssd-ipa 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- IPA back end
ii sssd-krb5 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- Kerberos back end
ii sssd-krb5-common 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- Kerberos helpers
ii sssd-ldap 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- LDAP back end
ii sssd-proxy 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- proxy back end
ii sssd-tools 1.13.4-1ubuntu1.9 amd64 System Security Services Daemon -- tools
After some more tests I found that package
keyutils
is not installed anymore on my newer systems > 16.04. After installing package keyutils mount.cifs is mounting via kerberos ticket again! So there is a dependency for package keyutils in relevant packages missing and should be added!
For those who want to know how to get to the missing package:
On 16.04 where mount.cifs is working with krb5 I got messages with cifs.upcall in syslog. The manpage for cifs.upcall showed me a reference to request-key.conf. That file or manpage was not installed in newer systems and is located in keyutils.