Hi Andreas,

Should I try to produce some info to you regarding the "Mount.cifs"
defect?

It was a long time since I last saw it, so it may take some time to
dig up again...but it seems to be worthwhile to generate some
additional debug info to you.

Please write, if there are particular details you are looking for,
otherwise I will try to follow your outline in the email, looking for
keys in keystores. But it may take some time, due to the upcomming
semester, and lots of new students!

Regards
Carsten Eie Frigaard

Den ons. 3. jul. 2019 kl. 22.31 skrev Andreas Hasenack <andr...@canonical.com>:
>
> It's not as simple as that, I can mount cifs shares just fine on 18.04
> without having keyutils installed. I tried the exact same command line
> as in comment #1, bar the username/domain, against a synology DS216 NAS,
> and it worked just fine:
>
> $ sudo mount -t cifs //ds216.lowtech/downloads --verbose -o 
> vers=3,username=andreas,sec=ntlmv2,uid=1000,gid=10000,iocharset=utf8,domain=LOWTECH,nounix
> Password for andreas@//ds216.lowtech/downloads:  *************
> mount.cifs kernel mount options: 
> ip=10.10.1.5,unc=\\ds216.lowtech\downloads,vers=3.0,file_mode=0644,dir_mode=0755,vers=3,sec=ntlmv2,iocharset=utf8,nounix,uid=1000,gid=10000,user=andreas,domain=LOWTECH,pass=********
>
> $ mount -t cifs
> //ds216.lowtech/downloads on /ds216/downloads type cifs 
> (rw,nosuid,nodev,noexec,relatime,vers=3,sec=ntlmv2,cache=strict,username=andreas,domain=LOWTECH,uid=1000,forceuid,gid=10000,forcegid,addr=10.10.1.5,file_mode=0644,dir_mode=0755,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1,user)
>
> Do you guys have a pam module or something else storing keys in the
> kernel keyring, which cifs-utils is trying to use in your case? Try
> "keyctl show", as root and as your user.
>
> Something else you could try is enabling cifs debugging, as outlined
> here:
>
> https://wiki.samba.org/index.php/LinuxCIFS_troubleshooting#Enabling_Debugging
>
>
> The first two "echo" commands fail here, but the one to cifsFYI works, and 
> produces a bit more information in dmesg.
>
> Let's see if any of this helps us get to the root of the problem.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1772148
>
> Title:
>   Mount.cifs does not work without keyutils being installed
>
> Status in cifs-utils package in Ubuntu:
>   Confirmed
>
> 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.0,username=xxxxxx,sec=ntlm,uid=1000,gid=1000,iocharset=utf8,domain=DD
>
>   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,username=xxxxxx,sec=ntlmv2,uid=1000,gid=1000,iocharset=utf8,domain=DD,nounix
>   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:16:ad:18:e7:87:00:18:4d:4f:f5:1c:08:00 SRC=10.88.128.13 
> DST=192.168.1.3 LEN=40 TOS=0x00 PREC=0x00 TTL=255 ID=17677 PROTO=TCP SPT=445 
> DPT=55514 WINDOW=0 RES=0x00 RST URGP=0
>   [   89.916307] [UFW BLOCK] IN=wlp4s0 OUT= 
> MAC=28:16:ad:18:e7:87:00:18:4d:4f:f5:1c:08:00 SRC=10.88.4.188 DST=192.168.1.3 
> LEN=40 TOS=0x00 PREC=0x00 TTL=255 ID=5527 PROTO=TCP SPT=445 DPT=52714 
> WINDOW=0 RES=0x00 RST URGP=0
>   [  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,username=xxxxxx,sec=ntlmv2,uid=1000,gid=1000,iocharset=utf8,domain=DD,nounix
>
>   >MOUNT OK HERE>
>
>   Smbmount> dmesg  | tail
>   [   89.916307] [UFW BLOCK] IN=wlp4s0 OUT= 
> MAC=28:16:ad:18:e7:87:00:18:4d:4f:f5:1c:08:00 SRC=10.88.4.188 DST=192.168.1.3 
> LEN=40 TOS=0x00 PREC=0x00 TTL=255 ID=5527 PROTO=TCP SPT=445 DPT=52714 
> WINDOW=0 RES=0x00 RST URGP=0
>   [  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 <ubuntu-devel-disc...@lists.ubuntu.com>
>   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-key.d/cifs.idmap.conf 4c95734a68b45b65a5dc7b108836427b
>    /etc/request-key.d/cifs.spnego.conf db5289bad3063aea58e1814380259a28
>   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-Maintainer: Debian Samba Maintainers 
> <pkg-samba-ma...@lists.alioth.debian.org>
>   Homepage: http://www.samba.org/~jlayton/cifs-utils/
>
>   My 18.04:
>   Package: cifs-utils
>   Status: install ok installed
>   Priority: optional
>   Section: otherosfs
>   Installed-Size: 226
>   Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
>   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-key.d/cifs.idmap.conf 4c95734a68b45b65a5dc7b108836427b
>    /etc/request-key.d/cifs.spnego.conf db5289bad3063aea58e1814380259a28
>   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-Maintainer: Debian Samba Maintainers 
> <pkg-samba-ma...@lists.alioth.debian.org>
>   Homepage: http://www.samba.org/~jlayton/cifs-utils/
>
>
>   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
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/cifs-utils/+bug/1772148/+subscriptions

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

Title:
  Mount.cifs does not work without keyutils being installed

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to