Can't access SMB

I have an issue accessing my SMB on Windows 10. Hopefully this is something someone here can help me with. I am relatively new to TrueNAS so I’m hoping this is just a config issue that I am not familiar with.
I had this set up and functional on a test TrueNAS Scale running Dragonfish-24.04.2. I don’t understand why but on my Windows 10 machine it tells me there is a network issue or logon problem. I did have this machine off for quite some time and just recently powered it up to find this issue. It was being used to test TrueCHARTS but it was recently deprecated and I no longer have a need to test it. I just want to retrieve the information I have left on a couple of SMB shares that became inaccessible. It may be some of the settings that were changed to get TrueCHARTS to work.
Below is what I get when attempting to map it or navigate to it with windows explorer. It fails within a second or two but this was before implementing any type of troubleshooting/changes. It would give me the error below before making changes:
image

Note 100% sure if it matters but I do not have SMB1.0 enabled and do have SMB Direct enabled:
image

My global network settings are pointing to my router and I do have WS-DISCOVERY enabled:

I have 2 datasets/SMB shares that I’ve setup and have this issue with. I’ve changed and manipulated “PER” but not “smbshare” and below are the ACL settings for PER:


I have made sure that optytrex is a part of samba and has full access in it’s settings but I can provide screenshots if needed.

SMB shares services are running and enabled for both SMB shares and they have also been restarted multiple times throughout my troubleshooting. Both my TrueNAS and the win10 laptop used to access the SMBs have also been restarted multiple times. Hosts Allowed/Denied section is empty for both shares and neither one ever had guest access enabled, although for PER it was enabled > SMB service was restarted > TrueNAS rebooted > win10 machine was rebooted > previous steps reversed. No change.

For reference, below is the output to log.smbd
optytrex@optytrex:~$ head /var/log/samba4/log.smbd
[2024/05/03 15:49:51.052264, 1] …/…/source3/smbd/smb2_service.c:328(create_connection_session_info)
create_connection_session_info: guest user (from session setup) not permitted to access this share (smbshare)
[2024/05/03 15:49:51.053100, 1] …/…/source3/smbd/smb2_service.c:519(make_connection_snum)
make_connection_snum: create_connection_session_info failed: NT_STATUS_ACCESS_DENIED
[2024/05/03 15:49:51.064484, 1] …/…/lib/param/loadparm.c:1909(lpcfg_do_global_parameter)
lpcfg_do_global_parameter: WARNING: The “syslog only” option is deprecated
[2024/05/03 15:49:51.068717, 1] …/…/source3/smbd/smb2_service.c:328(create_connection_session_info)
create_connection_session_info: guest user (from session setup) not permitted to access this share (smbshare)
[2024/05/03 15:49:51.068836, 1] …/…/source3/smbd/smb2_service.c:519(make_connection_snum)
make_connection_snum: create_connection_session_info failed: NT_STATUS_ACCESS_DENIED
optytrex@optytrex:~$

I’m not sure why the time is off there. System shows:
optytrex@optytrex:~$ date
Wed Aug 14 13:07:32 PDT 2024
optytrex@optytrex:~$

I’ve attempted running net use /d /y * on my laptop and nfs4_getfacl /mnt/sharepath before rebooting both systems as suggested on an older forum but this did not help. the nfs4_getfacl command actually just tells not supported:
optytrex@optytrex:~$ nfs4_getfacl /mnt/asuni-test/shares/PER
Operation to request attribute not supported: /mnt/asuni-test/shares/PER
optytrex@optytrex:~$

Below is the output to testparm -s which seems to be frequently looked at in other forums but I’d be lying if I know what to look for:
optytrex@optytrex:~$ sudo testparm -s
Load smb config files from /etc/smb4.conf
lpcfg_do_global_parameter: WARNING: The “syslog only” option is deprecated
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)

Server role: ROLE_STANDALONE

Global parameters

[global]
bind interfaces only = Yes
disable spoolss = Yes
dns proxy = No
load printers = No
logging = file
max log size = 5120
netbios name = TRUENAS
passdb backend = tdbsam:/var/run/samba-cache/private/passdb.tdb
printcap name = /dev/null
registry shares = Yes
restrict anonymous = 2
server multi channel support = No
server string = TrueNAS Server
winbind request timeout = 2
idmap config * : range = 90000001 - 100000000
fruit:zero_file_id = false
fruit:nfs_aces = false
rpc_server:mdssvc = disabled
rpc_daemon:mdssd = disabled
idmap config * : backend = tdb
create mask = 0775
directory mask = 0775

[smbshare]
ea support = No
path = /mnt/asuni-test/shares/smbshare
posix locking = No
read only = No
smbd max xattr size = 2097152
vfs objects = streams_xattr shadow_copy_zfs ixnas zfs_core io_uring
tn:vuid =
fruit:time machine max size = 0
fruit:time machine = False
nfs4:chown = True
tn:home = False
tn:path_suffix =
tn:purpose = DEFAULT_SHARE

[PER]
ea support = No
path = /mnt/asuni-test/shares/PER
posix locking = No
read only = No
smbd max xattr size = 2097152
vfs objects = streams_xattr shadow_copy_zfs ixnas zfs_core io_uring
tn:vuid =
fruit:time machine max size = 0
fruit:time machine = False
nfs4:chown = True
tn:home = False
tn:path_suffix =
tn:purpose = DEFAULT_SHARE
optytrex@optytrex:~$

Interestingly enough, I do have access to these shares via my Pixel 5a running android 14 through the X-plore app. All files are accessible and I can also simply list them via ssh or the web GUI shell.
I can ping TrueNAS IP and if I add it to the hosts file I can ping the name that it resolves to the correct DHCP IP.

I’m not sure what is going on but hopefully someone’s seen this and can help. Let me know if you need any further info and I can do what I can to send it over.
Thanks in advanced!

Ive been having the same problem. My windows laptop isn’t seeing the SMB shares on my NAS but my Macs are seeing them.

I attempted to map this drive using a second laptop and it did prompt me for credentials but immediately fails showing a large red circle with an X and saying: “The mapped network drive could not be created because the following error has occurred:
The network logon failed.”
Might be something on the TrueNAS side…not letting the Windows machines authenticate. For the record, this second laptop has never touched a TrueNAS box like this.

OK! Disregard the previous update. I was able to use my second laptop to connect to that SMB share :grin:
The 1st laptop still doesn’t connect. Something on the Windows side is preventing me from connecting to this system. Not sure what it could be yet but I’ll update here in case it helps anyone.
The 2nd laptop wasn’t connecting because the share was encrypted and locked after a reboot. The 1st one still cannot connect after unlocking. I’ll keep troubleshooting.

Problem fixed. This win10 laptop was running SMBv1 instead of SMBv2. All I had to do was switch from 1 to 2. Quick link on how do it is here:

Essentially, I ran this command to find out which was enabled:
Get-SmbServerConfiguration |Format-List EnableSMB*

I know I was running v2 on TrueNAS so I enabled it and disable v1 with these commands:
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
Set-SmbServerConfiguration -EnableSMB2Protocol $true

I know the link says I don’t need to restart after making these changes but I did anyways and after it came back up my network drives were available.
Hope this helps!