Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 3145  / 3 Years ago, sat, may 29, 2021, 7:45:57

It's been a while since I used SAMBA to access network shares. It was working fine in 19.xx, but I think it may be broken in 20.04 and 20.10 (I'm using 20.10).


I can't access the shares on my own local computer, although I seem to be able to access shares on my router. It pops up an error dialog, with a message about "Failed to retrieve share list from server"? Sorry, I don't remember the exact error message.


I think I know what might be the problem. It seems that SMB1 may have been disabled for security reasons, but SMB2/3 may still be there. I don't exactly know how to find this out.


testparm passed. findsmb and smbtree didn't work (but they now do, after the following patch).


I edited /etc/samba/smb.conf and added the following to the network section...


client min protocol = NT1
server min protocol = NT1
name resolve order = bcast host lmhosts wins

restarted smbd and nmbd, and that seems to have fixed it. I think that this re-enables SMB1... but I'm no SAMBA expert here.


Now smbstatus shows...


Samba version 4.12.5-Ubuntu
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
24943 nobody nogroup satellite-e55 (ipv6:fe80::c433:26d6:91d2:3475:59876) NT1 - -
19177 nobody nogroup satellite-e55 (ipv4:192.168.0.100:57868) NT1 - -

Service pid Machine Connected at Encryption Signing
---------------------------------------------------------------------------------------------
IPC$ 19177 satellite-e55 Sat Mar 20 07:17:40 PM 2021 PDT - -
IPC$ 24943 satellite-e55 Sun Mar 21 07:56:25 AM 2021 PDT - -

No locked files

Is this what's happening, and did I implement the correct/best fix? What happened in 20.xx that might have caused this problem?


Update #1:


nmap --script smb-protocols IPofServer/32


My router...


~$ nmap --script smb-protocols 192.168.0.1/32
Starting Nmap 7.91 ( https://nmap.org ) at 2021-03-22 07:01 PDT
Nmap scan report for caspurr.local (192.168.0.1)
Host is up (0.012s latency).
Not shown: 986 closed ports
PORT STATE SERVICE
53/tcp open domain
80/tcp open http
139/tcp open netbios-ssn
445/tcp open microsoft-ds
548/tcp open afp
631/tcp open ipp
5000/tcp open upnp
8200/tcp open trivnet1
9100/tcp open jetdirect
9101/tcp open jetdirect
9102/tcp open jetdirect
9103/tcp open jetdirect
20005/tcp open btx
49152/tcp open unknown

Host script results:
| smb-protocols:
| dialects:
| NT LM 0.12 (SMBv1) [dangerous, but default]
| 2.02
| 2.10
| 3.00
| 3.02
|_ 3.11

Nmap done: 1 IP address (1 host up) scanned in 4.21 seconds

My PC...


~$ nmap --script smb-protocols 192.168.0.100/32
Starting Nmap 7.91 ( https://nmap.org ) at 2021-03-22 07:03 PDT
Nmap scan report for ubuntu-eth0.local (192.168.0.100)
Host is up (0.00012s latency).
Not shown: 996 closed ports
PORT STATE SERVICE
80/tcp open http
139/tcp open netbios-ssn
445/tcp open microsoft-ds
631/tcp open ipp

Host script results:
| smb-protocols:
| dialects:
| NT LM 0.12 (SMBv1) [dangerous, but default]
| 2.02
| 2.10
| 3.00
| 3.02
|_ 3.11

More From » samba

 Answers
6

There are two issues here - really three - that have combined to cause the issue you reported.


One is a bug in gvfs ( gvfsd-smb-browse ) that is hard-wired to use SMB1 ( NT1 ) to get a list of the servers and their shares when you browse for them in your file manager.


The second one is Sambas decision to disable ( but not remove ) SMB1 on both the client and server side.


Your samba server can run between SMB2.02 to SMB3. The bug in gvfs causes the samba client to try to access that server using SMB1 which the server cannot understand so it throws an error:



Failed to retrieve share list from server: Invalid argument



There are three ways to get around this issue:


[1] Bypass gvfsd-smb-browse by asking for the server and its share in Connect to Server: smb://server-host-name.local/share-name


Samba client and server will connect using SMB3.


[2] OR do what you just did and set the min server and client to SMB1 ( NT1 ). IT will also connect using SMB3 because the server and client negotiate with one another to determine the best dialect to use after the initial SMB1 connection.


[3] OR use a mount.cifs mount which will also connect using SMB3. This has to be set up in fstab to happen automatically.


If it makes you feel any better a newly installed Win10 machine will not be able to "discover" your samba server at all because it too disabled SMB1. The solution there is the same as for your Linux system: Connect with a server-host-name.local OR enable SMB1 on the client side of Win10 which Microsoft really doesn't want anyone to do.


[#1793] Monday, May 31, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ainlyyor

Total Points: 210
Total Questions: 129
Total Answers: 116

Location: Barbados
Member since Sun, Nov 27, 2022
1 Year ago
ainlyyor questions
Sun, Jun 19, 22, 23:36, 2 Years ago
Sun, Jan 29, 23, 10:33, 1 Year ago
Sat, Feb 4, 23, 18:19, 1 Year ago
;