No more smb access after migration to UBUNTU 20.04 from UBUNTU 19.10

Bug #1875354 reported by LE POITTEVIN
30
This bug affects 7 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Hello everyone,
I no longer have access to my devices (NAS and other pcs - windows) from Nautilus. The command smb://IP address doesn't work anymore since the upgrade.
some tests :
1

I tried to change the parameter "client max protocol = NT1" in client max protocol = NT1 since my NAS is still in smb1 version. But without change, I can't navigate the network using smb, but I can do it with AFP.
2
I don't know if this will be useful but I also added "/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/moduleslibsmb.so" and modified
"/etc/gnome-vfs-2.0/modules/extra-modules.conf" to account for smb in nautilus. I can browse the Windows network again, but I can't access my files, just the share folder.
gio mount smb://192.168.1.1/USB1
gio: smb://192.168.1.1/usb1/: Impossible de monter le partage Windows : Argument invalide

To get around the problem I went through an fstab mount, it works but it's less convenient and the login is slower (especially after the NAS goes to sleep).
Hopefully someone will be able to help me.
Thanks in advance.

Tags: bot-comment
Revision history for this message
LE POITTEVIN (lepolau) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1875354/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
LE POITTEVIN (lepolau) wrote :

modified the source package attributed to this bug

affects: ubuntu → gvfs (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gvfs (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, gnome-vfs hasn't been used by nautilus for over 10 years so your added files should make a difference.

Could you get a debug log as explained on https://wiki.gnome.org/Projects/gvfs/debugging ? Using the GVFS_SMB_DEBUG=10 argument (review the log to filter private informations before submitting)

Does connecting to that share using
$ smbclient //192.168.1.1/USB1
works?

Changed in gvfs (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
LE POITTEVIN (lepolau) wrote :

Thank you for coming back.
So I'm going to start from a good base and delete what I did.

laurent@laurent-iMac:~$ pkill gvfs; pkill nautilus
pkill: le pid 1184 n'a pu être tué: Opération non permise
pkill: le pid 1199 n'a pu être tué: Opération non permise
pkill: le pid 1204 n'a pu être tué: Opération non permise
pkill: le pid 1212 n'a pu être tué: Opération non permise
pkill: le pid 1217 n'a pu être tué: Opération non permise
pkill: le pid 1222 n'a pu être tué: Opération non permise
pkill: le pid 1226 n'a pu être tué: Opération non permise

In the order of what I tried to open:
Windows network (it took a while to open, but I have access to the WORKGROUP,
opening of WORKGROUP (quick opening and I can see my whole network)
opening my SIN - 192.168.1.110 (SMB1) I see the 5 share folders
opening an unsecured folder (Public) "Cannot access location - Cannot mount Windows share : The software caused the connection to be aborted"
opening a folder secured with password (laurent) - "Cannot access location - Cannot mount Windows share : The software caused the connection to be aborted."
opening a shared folder on my router (192.168.1.1 - SMB?) (USB1) - "Cannot access location - Cannot mount Windows share : The software caused the connection to be aborted"
note that after that I can't see the workgroup in windows network "the folder is empty"

So not that I click on the share folder or by indicating its address for example smb://192.168.1.1/USB1, I can't access my smb shares.

shares, hoping that this answers your requests.

Translated with www.DeepL.com/Translator (free version)

Revision history for this message
LE POITTEVIN (lepolau) wrote :

IP of my pc : 192.168.1.10

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the details, could you also try with smbclient as requested at the bottom on my comment?

Does connecting to that share using
$ smbclient //192.168.1.1/USB1
works?

(or similar on other shares)

Revision history for this message
LE POITTEVIN (lepolau) wrote :

Sorry, I got confused with smb://.
...I've been doing a lot of tests because I'm not getting the same feedback:

laurent@laurent-iMac:~$ smbclient //192.168.1.1/USB1
Unknown parameter encountered: ", bind interfaces only"
Ignoring unknown parameter ", bind interfaces only"
protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED

laurent@laurent-iMac:~$ smbclient //192.168.1.100/Public
Unknown parameter encountered: ", bind interfaces only"
Ignoring unknown parameter ", bind interfaces only"
do_connect: Connection to 192.168.1.100 failed (Error NT_STATUS_HOST_UNREACHABLE)

Revision history for this message
LE POITTEVIN (lepolau) wrote :

I confirm that it still works with ubuntu 19.10 up to date.
However, I can't navigate in the windows network. The folder remains empty.
The access by smb://IP/folder works, as well as smbclient //IP/folder but smbtree tells me "Unable to initialise messaging context" but this seems to be normal given the version of samba 4.10.7.

Revision history for this message
LE POITTEVIN (lepolau) wrote :

In response to the error "Unknown parameter encountered: ", bind interfaces only"...
Ignoring unknown parameter ", bind interfaces only", I corrected the typo and I'll send you my smb.conf just in case.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, since smbclient has the same issue it's probably an issue with the libsmbclient library, reassigning

affects: gvfs (Ubuntu) → samba (Ubuntu)
Changed in samba (Ubuntu):
status: Incomplete → New
Revision history for this message
Stefan Metzmacher (metze) wrote :

You need "client min protocol = NT1" (min not max!),
see https://www.samba.org/samba/history/samba-4.12.0.html

Revision history for this message
Morbius1 (morbius1) wrote :

"laurent@laurent-iMac:~$ smbclient //192.168.1.1/USB1
...
...
protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED"

You are getting a "protocol negotiation failed" error because the server can only be accessed with SMB1 ( NT1 ) and there is no SMB1 ( NT1 ) in the version of samba that comes with Ubuntu 20.

A better approach would be a cifs mount where you can dictate the dialect of smb but for smbclient to connect you need to add "client min protocol = NT1" and NOT "client max protocol" to your smb.conf - then restart smbd.

Then smbclient will connect.

Revision history for this message
LE POITTEVIN (lepolau) wrote :

Thank you for your help but I only indicated some tests I had done after internet research before posting here.
Anyway, despite the changes in the smb.conf that I mentioned at the beginning of my post, especially concerning the smb1 protocol, smbclient doesn't work. As I said before posting the debug file, my smb.conf is back to its initial state, the one that worked under UBUNTU 19.10, and works on my laptop under eoan.
Indeed I read several times that SMB1 was no longer supported under UBUNTU 20.04, does this mean that my NAS (192.168.1.110) won't be able to be seen by Nautilus other than through a CIFS mount ? As I said, this is the workaround I used, but it's a shame...
Then, I don't know the protocol used on my Livebox 4 router (192.168.1.1) so I don't know if it's the same problem.

Revision history for this message
LE POITTEVIN (lepolau) wrote :

indeed I have just checked and my router however relatively recent still uses smb1.

"Morbius1 (morbius1) ", According to what you say, I could not access my NAS or my router any more than a CIFS mount? it's a pity, even under windows one can force, even if it is not recommendable from a security point of view I admit it.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Have you tried smbclient with -m NT1?

Revision history for this message
LE POITTEVIN (lepolau) wrote :

smbclient //192.168.1.1/USB1 --option='client min protocol=NT1'
Enter WORKGROUP\laurent's password:
Try "help" to get a list of possible commands.
smb: \>

I just added "client min protocol=NT1" to my /etc/samba/smb.conf and it works again. Thanks to all of you for your help and sorry, as Stefan pointed out I should have read the official doc instead of some sites.
The problem is solved for me.

Thanks again.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for getting back to us.

I'm going to close this bug as invalid, since the software is working as expected.

Changed in samba (Ubuntu):
status: New → Invalid
Revision history for this message
Mustapa Osman (mustapaosman2008) wrote :

Hello, I can transfer files to my NAS. Always error why copying. before this I cant even access the smb server until i follow your recommendation, edit smb.conf and add NT1. Even after the changes I can transfer any files. I am using ubuntu 20.04 which i just upgraded it from 19 which was working perfectly. All the people above bugs reporting are , there some issue on Ubuntu 20 on accessing NAS server. Please i am using for my office. we have 50 desktop here!!!..

So overall issues is

a) can access after editing smb.conf to NT1 but all my video file becomes a folder name.MP4, avi, mkv etc.
b) I can't copy any of my files to my NAS. all error copying.

Urgently please solve this asap or I have to downgrade all my company desktop.

Revision history for this message
Mustapa Osman (mustapaosman2008) wrote :

I just found how to solve it but not the same as ubuntu 19 which has no issue at all.

I have to rename my file from e.g

from for e.g master.event.200420.hdf.tvs-sv

to for e.g master.event.200420

Then only it works. but it did ask whether you want to merge the files ( even though it is a fresh or new file to be copy to the NS). Whats is going on guys ?? I miss my Ubuntu 19. please help to fix this.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Mustapa, about files being shown as directories, you are probably being affected by bug https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1872476 which is an in-progress SRU and has a fix uploaded to focal-proposed already.

Revision history for this message
Celina (celinasam) wrote (last edit ):

File sharing stopped working after upgrading to Ubuntu 20.04. Turns out there was a change in behavior in Samba v4.11 that disabled SMB1 protocol by default.

Here’s the fix, from Reddit
https://www.reddit.com/r/linuxquestions/comments/djvpdn/smb_connection_nautilus_error_debian_bullseye/

You can reenable it by adding

client min protocol = CORE

to the [global] section of you /etc/samba/smb.conf file on your client machine.

You might want to add that it is then necessary to restart the smb daemon:

sudo systemctl restart smbd.service

Hope it is helpfull.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Celina,
thanks for the info but that isn't the same issue that was discussed in this bug.
Furthermore while enabling SMBv1 is a workaround to the problem you had it is considered a huge security risk and therefore should be a last resort and only for e.g. isolated environments.
I tried to find a good link of the issues, but the problem with SMBv1 is that there are too-many of them that I couldn't find a single page outlining all of them nicely :-/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.