SMB share connection error: "System error 53 has occurred. The network path was not found." but only on a certain Win10 machine, others work fine

I have a SMB "samba" share setup on my RPie3. All my other machines can connect to it fine, but my primary Win10 machine cannot. I have ruled out DNS, and also SMB verion (SMB2 is in use) so I'm stumped.

Update: This is just a retro gaming system. I do not want or need this to be secure AT ALL, I just want it to work.

This is what I get on a working machine, testing via CMD.exe:

C:\>ping RetroPie -4

Pinging RetroPie.myDomain.local [192.168.3.56] with 32 bytes of data:
Reply from 192.168.3.56: bytes=32 time=6ms TTL=64
Reply from 192.168.3.56: bytes=32 time=10ms TTL=64
Reply from 192.168.3.56: bytes=32 time=8ms TTL=64
Reply from 192.168.3.56: bytes=32 time=5ms TTL=64

Ping statistics for 192.168.3.56:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 5ms, Maximum = 10ms, Average = 7ms

C:\>net view \\RetroPie
Shared resources at \\RetroPie

Samba 4.9.5-Debian

Share name     Type  Used as  Comment

-------------------------------------------------------------------------------
configs        Disk           configs
homes          Disk           Home Directories
roms           Disk           roms
splashscreens  Disk           splashscreens
The command completed successfully.

...and here are the same tests from my non-working Win10 machine:

PS C:\> ping -4 RetroPie                                                                                             
Pinging RetroPie.MyDomain.local [192.168.3.56] with 32 bytes of data:
Reply from 192.168.3.56: bytes=32 time=5ms TTL=64
Reply from 192.168.3.56: bytes=32 time=7ms TTL=64
Reply from 192.168.3.56: bytes=32 time=5ms TTL=64
Reply from 192.168.3.56: bytes=32 time=5ms TTL=64

Ping statistics for 192.168.3.56:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 5ms, Maximum = 7ms, Average = 5ms
PS C:\> net view \\RetroPie
System error 53 has occurred.

The network path was not found.

PS C:\> net view \\192.168.3.56
System error 53 has occurred.

The network path was not found.

EDIT1: Things I have ruled out:

  1. Windows firewall
  2. Windows Defender anti-virus
  3. SMB1 being in use (temporarily enabled it on my Win10 machine)

EDIT2 - Here are my smb.conf files (there are 2 and it's unclear which is needed, so I'm including both - note that all lines starting with a # comment have been removed for brevity's sake):

pi@retropie:/ $ cat ./etc/samba/smb.conf

[global]
   workgroup = drewz.local
   client max protocol = SMB3
   client min protocol = SMB2
   server max protocol = SMB2
;   interfaces = 127.0.0.0/8 eth0
;   bind interfaces only = yes
   log file = /var/log/samba/log.%m
   max log size = 1000
   logging = file
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
;   logon path = \\%N\profiles\%U
;   logon drive = H:
;   logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
; add group script = /usr/sbin/addgroup --force-badname %g
;   include = /home/samba/etc/smb.conf.%m
;   idmap config * :              backend = tdb
;   idmap config * :              range   = 3000-7999
;   idmap config YOURDOMAINHERE : backend = tdb
;   idmap config YOURDOMAINHERE : range   = 100000-999999
;   template shell = /bin/bash
   usershare allow guests = yes
[homes]
   comment = Home Directories
   browseable = yes
   read only = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700
;   write list = root, @lpadmin
[roms]
comment = roms
path = "/home/pi/RetroPie/roms"
browsable = yes
writeable = yes
guest ok = yes
read only = no
create mask = 0644
directory mask = 0755
force user = pi
[configs]
comment = configs
path = "/opt/retropie/configs"
writeable = yes
guest ok = yes
create mask = 0644
directory mask = 0755
force user = pi
[splashscreens]
comment = splashscreens
path = "/home/pi/RetroPie/splashscreens"
writeable = yes
guest ok = yes
create mask = 0644
directory mask = 0755
force user = pi

pi@retropie:/ $ cat /usr/share/samba/smb.conf

[global]
   workgroup = drewz.local
   client max protocol = SMB3
   client min protocol = SMB2
   server max protocol = SMB2
;   interfaces = 127.0.0.0/8 eth0
;   bind interfaces only = yes
   log file = /var/log/samba/log.%m
   max log size = 1000
   logging = file
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
;   logon path = \\%N\profiles\%U
;   logon drive = H:
;   logon script = logon.cmd
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
; add group script = /usr/sbin/addgroup --force-badname %g
;   include = /home/samba/etc/smb.conf.%m
;   idmap config * :              backend = tdb
;   idmap config * :              range   = 3000-7999
;   idmap config YOURDOMAINHERE : backend = tdb
;   idmap config YOURDOMAINHERE : range   = 100000-999999
;   template shell = /bin/bash
   usershare allow guests = yes
[homes]
   comment = Home Directories
   browseable = no
   read only = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
;   write list = root, @lpadmin

The solution to the problem is based on an answer to the post Can not connect to share (system error 1272), although only part of that answer was required.

The following lines need to be updated in smb.conf :

   [global]
   client min protocol = SMB3
   client max protocol = SMB3
   restrict anonymous = 2
   encrypt passwords = true

The answer advised removing the line of map to guest = bad user, although for the poster without this line the network share wasn't accessible.


Just to add to this - the error message 53 in Windows net command is not super helpful. There are some old pages related to Netbios and the like which is not the case here. If you are using Ubuntu or similar to mount nfsd you should google that. ie this page https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-20-04

For me the /etc/exports was not configured correctly. I needed to add this (and reboot the linux system)

/mnt/TestFiles 172.16.16.0/24(rw,no_subtree_check,no_root_squash)

Further there is no nfs logging by default. To do that run this command.

rpcdebug -m nfsd -s proc

From this page: https://www.serverstack.com/blog/2012/11/21/debugging-nfs-file-access-on-server-and-client-side/index.html

"You can now test logging on server by creating and deleting a file from an NFS client:

[root@nfs-client ~]# cd /mnt/nfs && touch test && rm -rf test

The debug messages will be logged on the NFS server to /var/log/messages by default. "