On client side, I tried adding "client min protocol = NT1" but it does not solve the problem.
So what could I do to mount the remote drive?
Setup:
Under Mint 20 blank installation, guest connection (no password) works if I force vers=1.0me wrote: To debug that I used to virtual machine, one with linux mint 20 and one with linux mint 21, both blank installation with no packaged added. I'm pretty sure the virtualization do not alter the problem, as the error message I see are the same, and the diagnostic is the same : ok with mint 20, nok with mint 21. I just don't want to restart my computer 20 times to switch distros and gather logs.
Code: Select all
phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test/ -o guest
mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
phil@phil-VirtualBox:~$
phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test/ -o guest,vers=1.0
phil@phil-VirtualBox:~$ cd test
## No error message, mount is successful, I have access to my files in the folder test
phil@phil-VirtualBox:~$ mount --version
mount de util-linux 2.34 (libmount 2.34.0: selinux, smack, btrfs, namespaces, assert, debug)
phil@phil-VirtualBox:~$ mount.cifs --version
mount.cifs version: 6.9
Code: Select all
phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test -o guest
mount error: Server abruptly closed the connection.
This can happen if the server does not support the SMB version you are trying to use.
The default SMB version recently changed from SMB1 to SMB2.1 and above. Try mounting with vers=1.0.
mount error(112): Host is down
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
phil@phil-VirtualBox:~$
phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test -o guest,vers=1.0
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
phil@phil-VirtualBox:~$ mount --version
mount de util-linux 2.37.2 (libmount 2.37.2: selinux, smack, btrfs, verity, namespaces, assert, debug)
phil@phil-VirtualBox:~$ mount.cifs --version
mount.cifs version: 6.14
Code: Select all
Sep 28 12:53:46 phil-VirtualBox kernel: [ 285.884128] CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers
Sep 28 12:53:46 phil-VirtualBox kernel: [ 285.884140] CIFS: Attempting to mount \\192.168.1.1\STRATOCUMULUS
Sep 28 12:53:46 phil-VirtualBox kernel: [ 285.903354] CIFS: VFS: \\192.168.1.1 failed to connect to IPC (rc=-6)
Sep 28 12:53:46 phil-VirtualBox kernel: [ 285.907219] CIFS: VFS: cifs_mount failed w/return code = -6
About smb.conf and smbclient :
About CIFS_ALLOW_INSECURE_LEGACY:me wrote: I read multiple (but *#µ*% I can't found it now), that smb.conf is NOT required to mount a drive with CIFS. Only cifs-utils is needed.
Proof: under Ubuntu 18, samba and smbclient are not installed. "/etc/samba/" folder does not exist. With only only cifs-utils, I can connect the drive with mount.cifs (with guest and vers=1.0 option).
But it doesn't hurt, so... Under both Mint 20 and Mint 21:
By default,So I added "client min protocol = NT1" to /etc/samba/smb.conf and then the connection works :Code: Select all
phil@phil-VirtualBox:~$ smbclient -L //192.168.1.1/ protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED
And I can browse my files:Code: Select all
phil@phil-VirtualBox:~$ smbclient -L //192.168.1.1/ Enter WORKGROUP\phil's password: [left blank, no password required] Sharename Type Comment --------- ---- ------- StratoCumulus Disk StratoCumulus IPC$ IPC IPC Service (box samba 3.6.5) Reconnecting with SMB1 for workgroup listing. Server Comment --------- ------- LENUAGE box samba 3.6.5 Workgroup Master --------- ------- WORKGROUP LENUAGE
Works similar with both Mint 20 and 21.Code: Select all
phil@GLaDOS:~$ smbclient //192.168.1.1/StratoCumulus lpcfg_do_global_parameter: WARNING: The "client lanman auth" option is deprecated Password for [WORKGROUP\phil]: [left blank, no password required] Try "help" to get a list of possible commands. smb: \> ls . D 0 Sun Sep 25 18:15:20 2022 .. D 0 Thu Sep 22 19:34:27 2022 $RECYCLE.BIN D 0 Sat Aug 17 16:25:33 2019 [...]
About sec parameter:Samba v1 deprecation is a kernel feature, so I checked both system configuration, it seems it's enabled on both system so no problem there.Code: Select all
phil@GLaDOS:~$ cat /boot/config-`uname -r` | grep CIFS_ALLOW_INSECURE CONFIG_CIFS_ALLOW_INSECURE_LEGACY=y
So far I have no other lead :me wrote: Under mint 20, I can connect even with sec=none:all those works.Code: Select all
phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test/ -o guest,vers=1.0 phil@phil-VirtualBox:~$ sudo umount test/ phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test/ -o guest,vers=1.0,sec=ntlm phil@phil-VirtualBox:~$ sudo umount test/ phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test/ -o guest,vers=1.0,sec=ntlmv2 phil@phil-VirtualBox:~$ sudo umount test/ phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test/ -o guest,vers=1.0,sec=none phil@phil-VirtualBox:~$ sudo umount test/
Under mint 21, sec=ntlmv2 and sec=none will result in this same error "no such device...". But sec=ntlm give "invalid argument"I've read using ntlm could be used to solve connection to older servers...But here, I have it as "invalid argument" (same for ntlmssp). It's not a server error, it's an invalid command (we can check with wireshark: none package is exchanged, there is no try, cifs just doesn't know what ntlm is)Code: Select all
phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test -o guest,vers=1.0 Retrying with upper case share name mount error(6): No such device or address Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test -o guest,vers=1.0,sec=ntlm mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test -o guest,vers=1.0,sec=ntlmv2 Retrying with upper case share name mount error(6): No such device or address Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) phil@phil-VirtualBox:~$ sudo mount.cifs //192.168.1.1/StratoCumulus test -o guest,vers=1.0,sec=none Retrying with upper case share name mount error(6): No such device or address Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)
- mount.cifs using "vers=1.0" is required and is used! If it's missing, I have a message telling me to add it. If a add it, I have "No such device or address"
- Modifying /etc/samba/smb.conf doesn't seems to change anything
- Kernel legacy CIFS is enabled
- I can't enable ntlm (because invalid argument), but I'm not sure I have to...
If anyone has a lead ! Thanks
edit: Seems spoiler do not work, I used quote instead to separate a bit and organize message