[Bug 1734700] Re: mounting CIFS share failure (cifs_mount failed w/return code = -2)

Jhair Tocancipa Triana jhair.tocancipa at gmail.com
Fri Apr 24 18:26:04 UTC 2020


Please find the syslog output if cifs debug enabled below. The share was
accessible on Monday 20 at least, I was running focal already, but I've
been upgrading regularly. Not sure which package update broke it (I've
changed the name of the share below manually):

[ 3555.871083] fs/cifs/cifsfs.c: Devname: //machine/c$ flags: 0
[ 3555.871095] fs/cifs/connect.c: iocharset set to utf8
[ 3555.871109] fs/cifs/connect.c: Domain name set
[ 3555.871111] fs/cifs/connect.c: Username: User
[ 3555.871113] fs/cifs/connect.c: file mode: 0775  dir mode: 0775
[ 3555.871115] fs/cifs/connect.c: CIFS VFS: in mount_get_conns as Xid: 24 with uid: 0
[ 3555.871116] fs/cifs/connect.c: UNC: \\machine\c$
[ 3555.871123] fs/cifs/connect.c: Socket created
[ 3555.871124] fs/cifs/connect.c: sndbuf 16384 rcvbuf 131072 rcvtimeo 0x6d6
[ 3555.872928] fs/cifs/fscache.c: cifs_fscache_get_client_cookie: (0x00000000daf5d217/0x00000000b00cbe0a)
[ 3555.872932] fs/cifs/connect.c: CIFS VFS: in cifs_get_smb_ses as Xid: 25 with uid: 0
[ 3555.872933] fs/cifs/connect.c: Existing smb sess not found
[ 3555.872935] fs/cifs/connect.c: Demultiplex PID: 5488
[ 3555.872937] fs/cifs/smb2pdu.c: Negotiate protocol
[ 3555.872970] fs/cifs/transport.c: Sending smb: smb_len=106
[ 3555.873494] fs/cifs/connect.c: RFC1002 header 0xf8
[ 3555.873498] fs/cifs/smb2misc.c: SMB2 data length 120 offset 128
[ 3555.873499] fs/cifs/smb2misc.c: SMB2 len 248
[ 3555.873531] fs/cifs/transport.c: cifs_sync_mid_result: cmd=0 mid=0 state=4
[ 3555.873537] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 3555.873539] fs/cifs/smb2pdu.c: mode 0x3
[ 3555.873540] fs/cifs/smb2pdu.c: negotiated smb2.0 dialect
[ 3555.873543] fs/cifs/asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
[ 3555.873545] fs/cifs/asn1.c: OID len = 7 oid = 0x1 0x2 0x348 0xbb92
[ 3555.873546] fs/cifs/asn1.c: OID len = 7 oid = 0x1 0x2 0x348 0x1bb92
[ 3555.873547] fs/cifs/asn1.c: OID len = 8 oid = 0x1 0x2 0x348 0x1bb92
[ 3555.873548] fs/cifs/asn1.c: OID len = 10 oid = 0x1 0x3 0x6 0x1
[ 3555.873550] fs/cifs/connect.c: Security Mode: 0x3 Capabilities: 0x300001 TimeAdjust: 0
[ 3555.873551] fs/cifs/smb2pdu.c: Session Setup
[ 3555.873552] fs/cifs/smb2pdu.c: sess setup type 4
[ 3555.873559] fs/cifs/transport.c: Sending smb: smb_len=124
[ 3555.873783] fs/cifs/connect.c: RFC1002 header 0x14e
[ 3555.873785] fs/cifs/smb2misc.c: SMB2 data length 262 offset 72
[ 3555.873786] fs/cifs/smb2misc.c: SMB2 len 334
[ 3555.873812] fs/cifs/transport.c: cifs_sync_mid_result: cmd=1 mid=1 state=4
[ 3555.873815] Status code returned 0xc0000016 STATUS_MORE_PROCESSING_REQUIRED
[ 3555.873819] fs/cifs/smb2maperror.c: Mapping SMB2 status code 0xc0000016 to POSIX err -5
[ 3555.873820] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 3555.873822] fs/cifs/smb2pdu.c: rawntlmssp session setup challenge phase
[ 3555.873859] fs/cifs/transport.c: Sending smb: smb_len=444
[ 3555.874370] fs/cifs/connect.c: RFC1002 header 0x48
[ 3555.874372] fs/cifs/smb2misc.c: SMB2 data length 0 offset 72
[ 3555.874373] fs/cifs/smb2misc.c: SMB2 len 73
[ 3555.874374] fs/cifs/smb2misc.c: Calculated size 73 length 72 mismatch mid 2
[ 3555.874400] fs/cifs/transport.c: cifs_sync_mid_result: cmd=1 mid=2 state=4
[ 3555.874401] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 3555.874404] fs/cifs/smb2pdu.c: SMB2/3 session established successfully
[ 3555.874407] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_smb_ses (xid = 25) rc = 0
[ 3555.874410] fs/cifs/connect.c: CIFS VFS: in cifs_setup_ipc as Xid: 26 with uid: 0
[ 3555.874411] fs/cifs/smb2pdu.c: TCON
[ 3555.874423] fs/cifs/transport.c: Sending smb: smb_len=124
[ 3555.874558] fs/cifs/connect.c: RFC1002 header 0x50
[ 3555.874560] fs/cifs/smb2misc.c: SMB2 len 80
[ 3555.874562] fs/cifs/smb2ops.c: add 64 credits total=193
[ 3555.874587] fs/cifs/transport.c: cifs_sync_mid_result: cmd=3 mid=3 state=4
[ 3555.874592] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 3555.874593] fs/cifs/smb2pdu.c: connection to pipe share
[ 3555.874595] fs/cifs/connect.c: CIFS VFS: leaving cifs_setup_ipc (xid = 26) rc = 0
[ 3555.874596] fs/cifs/connect.c: IPC tcon rc = 0 ipc tid = 1
[ 3555.874600] fs/cifs/connect.c: CIFS VFS: in cifs_get_tcon as Xid: 27 with uid: 0
[ 3555.874600] fs/cifs/smb2pdu.c: TCON
[ 3555.874607] fs/cifs/transport.c: Sending smb: smb_len=120
[ 3555.874716] fs/cifs/connect.c: RFC1002 header 0x48
[ 3555.874718] fs/cifs/smb2misc.c: SMB2 len 73
[ 3555.874719] fs/cifs/smb2misc.c: Calculated size 73 length 72 mismatch mid 4
[ 3555.874720] fs/cifs/smb2ops.c: add 64 credits total=256
[ 3555.874758] fs/cifs/transport.c: cifs_sync_mid_result: cmd=3 mid=4 state=4
[ 3555.874762] Status code returned 0xc00000cc STATUS_BAD_NETWORK_NAME
[ 3555.874765] fs/cifs/smb2maperror.c: Mapping SMB2 status code 0xc00000cc to POSIX err -2
[ 3555.874765] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 3555.874766] CIFS VFS:  BAD_NETWORK_NAME: \\machine\c$
[ 3555.874768] fs/cifs/connect.c: CIFS VFS: leaving cifs_get_tcon (xid = 27) rc = -2
[ 3555.874769] fs/cifs/connect.c: Tcon rc = -2
[ 3555.874771] fs/cifs/connect.c: build_unc_path_to_root: full_path=\\machine\c$
[ 3555.874772] fs/cifs/connect.c: build_unc_path_to_root: full_path=\\machine\c$
[ 3555.874773] fs/cifs/connect.c: build_unc_path_to_root: full_path=\\machine\c$
[ 3555.874774] fs/cifs/dfs_cache.c: do_dfs_cache_find: search path: \machine\c$
[ 3555.874774] fs/cifs/dfs_cache.c: do_dfs_cache_find: cache miss
[ 3555.874775] fs/cifs/dfs_cache.c: do_dfs_cache_find: DFS referral request for \machine\c$
[ 3555.874776] fs/cifs/smb2ops.c: smb2_get_dfs_refer: path: \machine\c$
[ 3555.874779] fs/cifs/smb2pdu.c: SMB2 IOCTL
[ 3555.874784] fs/cifs/transport.c: Sending smb: smb_len=168
[ 3555.874892] fs/cifs/connect.c: RFC1002 header 0x48
[ 3555.874894] fs/cifs/smb2misc.c: SMB2 data length 0 offset 0
[ 3555.874895] fs/cifs/smb2misc.c: SMB2 len 73
[ 3555.874895] fs/cifs/smb2misc.c: Calculated size 73 length 72 mismatch mid 5
[ 3555.874896] fs/cifs/smb2ops.c: add 10 credits total=265
[ 3555.874918] fs/cifs/transport.c: cifs_sync_mid_result: cmd=11 mid=5 state=4
[ 3555.874922] Status code returned 0xc000019c STATUS_FS_DRIVER_REQUIRED
[ 3555.874924] fs/cifs/smb2maperror.c: Mapping SMB2 status code 0xc000019c to POSIX err -95
[ 3555.874925] fs/cifs/misc.c: Null buffer passed to cifs_small_buf_release
[ 3555.874928] fs/cifs/dfs_cache.c: do_dfs_cache_find: search path: \machine\c$
[ 3555.874929] fs/cifs/dfs_cache.c: do_dfs_cache_find: cache miss
[ 3555.874930] fs/cifs/connect.c: cifs_put_smb_ses: ses_count=1
[ 3555.874931] fs/cifs/connect.c: CIFS VFS: in cifs_free_ipc as Xid: 28 with uid: 0
[ 3555.874932] fs/cifs/smb2pdu.c: Tree Disconnect
[ 3555.874933] fs/cifs/connect.c: CIFS VFS: leaving cifs_free_ipc (xid = 28) rc = -5
[ 3555.874934] fs/cifs/connect.c: failed to disconnect IPC tcon (rc=-5)
[ 3555.874934] fs/cifs/connect.c: CIFS VFS: in cifs_put_smb_ses as Xid: 29 with uid: 0
[ 3555.874935] fs/cifs/smb2pdu.c: disconnect session 00000000f7a881f5
[ 3555.874940] fs/cifs/transport.c: Sending smb: smb_len=72
[ 3555.875038] fs/cifs/connect.c: RFC1002 header 0x44
[ 3555.875040] fs/cifs/smb2misc.c: SMB2 len 68
[ 3555.875041] fs/cifs/smb2ops.c: add 2 credits total=266
[ 3555.875063] fs/cifs/transport.c: cifs_sync_mid_result: cmd=2 mid=6 state=4
[ 3555.875072] fs/cifs/fscache.c: cifs_fscache_release_client_cookie: (0x00000000daf5d217/0x00000000b00cbe0a)
[ 3555.875091] fs/cifs/connect.c: CIFS VFS: leaving mount_put_conns (xid = 24) rc = 0
[ 3555.875092] CIFS VFS: cifs_mount failed w/return code = -2

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

Title:
  mounting CIFS share failure (cifs_mount failed w/return code = -2)

Status in cifs-utils package in Ubuntu:
  Confirmed

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,domain=DOMAIN,cruid=USER,sec=krb5 //HOST/share /mnt/tmp
  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,domain=DOMAIN //HOST/share /mnt/tmp
  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_NO_LOGON_SERVERS
  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          internationalization support for MIT Kerberos
  ii  krb5-user                                       1.15.1-2                                    amd64        basic programs to authenticate using MIT Kerberos
  ii  libgssapi-krb5-2:amd64                          1.15.1-2                                    amd64        MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
  ii  libkrb5-26-heimdal:amd64                        7.4.0.dfsg.1-2                              amd64        Heimdal Kerberos - libraries
  ii  libkrb5-3:amd64                                 1.15.1-2                                    amd64        MIT Kerberos runtime libraries
  ii  libkrb5support0:amd64                           1.15.1-2                                    amd64        MIT Kerberos runtime libraries - Support library
  ii  libsmbclient:amd64                              2:4.6.7+dfsg-1ubuntu3.1                     amd64        shared library for communication with SMB/CIFS servers
  ii  libsmbios2v5                                    2.3.1-0ubuntu2                              amd64        Provide access to (SM)BIOS information -- dynamic library
  ii  python-samba                                    2:4.6.7+dfsg-1ubuntu3.1                     amd64        Python bindings for Samba
  ii  samba                                           2:4.6.7+dfsg-1ubuntu3.1                     amd64        SMB/CIFS file, print, and login server for Unix
  ii  samba-common                                    2:4.6.7+dfsg-1ubuntu3.1                     all          common files used by both the Samba server and client
  ii  samba-common-bin                                2:4.6.7+dfsg-1ubuntu3.1                     amd64        Samba common files used by both the server and the client
  ii  samba-dsdb-modules                              2:4.6.7+dfsg-1ubuntu3.1                     amd64        Samba Directory Services Database
  ii  samba-libs:amd64                                2:4.6.7+dfsg-1ubuntu3.1                     amd64        Samba core libraries
  ii  samba-vfs-modules                               2:4.6.7+dfsg-1ubuntu3.1                     amd64        Samba Virtual FileSystem plugins
  ii  smb4k                                           2.0.1-1                                     amd64        Samba (SMB) share advanced browser
  ii  smbclient                                       2:4.6.7+dfsg-1ubuntu3.1                     amd64        command-line SMB/CIFS clients for Unix
  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+dfsg-5ubuntu2                                     all          Internationalization support for MIT Kerberos
  ii  krb5-user                                       1.13.2+dfsg-5ubuntu2                                     amd64        Basic programs to authenticate using MIT Kerberos
  ii  libgssapi-krb5-2:amd64                          1.13.2+dfsg-5ubuntu2                                     amd64        MIT Kerberos runtime libraries - krb5 GSS-API Mechanism
  ii  libkrb5-26-heimdal:amd64                        1.7~git20150920+dfsg-4ubuntu1.16.04.1                    amd64        Heimdal Kerberos - libraries
  ii  libkrb5-3:amd64                                 1.13.2+dfsg-5ubuntu2                                     amd64        MIT Kerberos runtime libraries
  ii  libkrb5support0:amd64                           1.13.2+dfsg-5ubuntu2                                     amd64        MIT Kerberos runtime libraries - Support library
  ii  libsmbclient:amd64                              2:4.3.11+dfsg-0ubuntu0.16.04.12                          amd64        shared library for communication with SMB/CIFS servers
  ii  python-samba                                    2:4.3.11+dfsg-0ubuntu0.16.04.12                          amd64        Python bindings for Samba
  ii  samba                                           2:4.3.11+dfsg-0ubuntu0.16.04.12                          amd64        SMB/CIFS file, print, and login server for Unix
  ii  samba-common                                    2:4.3.11+dfsg-0ubuntu0.16.04.12                          all          common files used by both the Samba server and client
  ii  samba-common-bin                                2:4.3.11+dfsg-0ubuntu0.16.04.12                          amd64        Samba common files used by both the server and the client
  ii  samba-dsdb-modules                              2:4.3.11+dfsg-0ubuntu0.16.04.12                          amd64        Samba Directory Services Database
  ii  samba-libs:amd64                                2:4.3.11+dfsg-0ubuntu0.16.04.12                          amd64        Samba core libraries
  ii  samba-vfs-modules                               2:4.3.11+dfsg-0ubuntu0.16.04.12                          amd64        Samba Virtual FileSystem plugins
  ii  smb4k                                           1.1.2-1                                                  amd64        Samba (SMB) share advanced browser for KDE
  ii  smbclient                                       2:4.3.11+dfsg-0ubuntu0.16.04.12                          amd64        command-line SMB/CIFS clients for Unix
  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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cifs-utils/+bug/1734700/+subscriptions



More information about the foundations-bugs mailing list