Windows 10 can't access TrueNas Share

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
So I just built a PC and installed TrueNAS Core 12.0 U6.1. I updated it, created a pool, user, and a SMB share. Every Linux PC in the house can see and access the NAS without trouble. Linux can read / write to it no problems. Windows 10 however is a completely different story. Not a single Windows PC I have will see NAS. I can use the web GUI, I can send wake on LAN packets to the PC from the Windows PCs, but can't access the storage pool. I never even get prompted for a user name / password (It does see Truenas connected to the network).

I've been doing a lot of Googling over the past couple days, and haven't had much luck. These PCs are Windows 10 Home, 21H1. So far I've tried:
  • Disabling the password on the user account in Truenas, No change.
  • Tried adding AllowInsecureGuestAuth in the Registry @ Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation, no change.
  • Tried disabling Windows Firewall, no change.
  • Installed SMB 1.0/CIFS File Sharing Support in Windows features, no change.
  • Under network double clicking on TRUENAS eventually greets me with a message that says "Windows cannot access \\TRUENAS"
  • Using a file explorer window and trying to visit \\192.168.1.4 (my static IP for my TrueNas box) greets me with a similar, "Windows cannot access \\192.168.1.4" message.
  • Just in case I've tried turning on file sharing. I don't think these PC's should need file sharing turned on though do they? I've tried to turn on Network discovery, but every time I go back into sharing settings it's off again?
I've tried these things individually, and together, none seem to work. Since they did not fix the problem I've undone these changes, as they didn't cure the problem. Is there something I'm missing? Information I can supply that could be helpful?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

In short, make sure your NAS under Network->Global Configuration has WS-Discovery enabled, and you've not shut down the Function Discovery Provider Host and Functio Discovery Resource Publication services on the Windows 10 boxes. This will get Network Neighborhood working.

Also, according to @anodos's post, it's not possible to browse to just \\192.168.1.4, because the SMB service doesn't implement the IPC$ share. You'll need to use the full share path, e.g., \\192.168.1.4\<name of your share>\.

Finally, root can't be used as the account to login to the share. This is disabled by design.
 
Last edited:

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
In short, make sure your NAS under Network->Global Configuration has WS-Discovery enabled, and you've not shut down the Function Discovery Provider Host and Functio Discovery Resource Publication services on the Windows 10 boxes. This will get Network Neighborhood working.

Also, according to @anodos's post, it's not possible to browse to just \\192.168.1.4, because the SMB service doesn't implement the IPC$ share. You'll need to use the full share path, e.g., \\192.168.1.4\<name of your share>\.

Finally, root can't be used as the account to login to the share. This is disabled by design.

Thank you for the quick reply. I believe this has gotten me closer. WS-Discovery was enabled. However one of those services was stopped, so I enabled both, and now have them set to auto. I still can't connect to to it, nor do I get a chance to ever enter a user name like I do from my Linux machines. Perhaps I still haven't gotten the correct path correct through all my attempts at guessing it.

Keep in mind, I may have something messed up at this point as I've been trying many things. It's no problem for me to start over if anyone sees something weird at this point, as there is no data on this right now.

So this is from Sharing - Windows Shares (SMB):

truenas1.jpg


Sharing - Windows Shares (SMB) - Edit Share ACL:

truenas2.jpg


Sharing - Windows Shares (SMB) - Edit Share Filesystem ACL:

truenas3.jpg


So best I can tell my share path would be \\192.168.1.4\NASBackup1\ ? Or perhaps \\192.168.1.4\NetworkBackup\? However neither of those work.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
What's the output of testparm -s, please?
 

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
Here you go, again thank you for your continued help:

Code:
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

# Global parameters
[global]
        aio max threads = 2
        bind interfaces only = Yes
        disable spoolss = Yes
        dns proxy = No
        enable web service discovery = Yes
        kernel change notify = No
        load printers = No
        logging = file
        max log size = 5120
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        registry shares = Yes
        restrict anonymous = 2
        server role = standalone server
        server string = TrueNAS Server
        unix extensions = No
        username map = /usr/local/etc/smbusername.map
        username map cache time = 60
        idmap config *: range = 90000001-100000000
        idmap config * : backend = tdb
        directory name cache size = 0
        dos filemode = Yes


[NASBackup1]
        ea support = No
        kernel share modes = No
        path = /mnt/NASBackup1/NetworkBackup
        posix locking = No
        read only = No
        vfs objects = streams_xattr shadow_copy_zfs ixnas aio_fbsd
        nfs4:chown = true
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Set your NASBackup1 share to be browseable. Is this a guest share? Guest shares won't prompt for logins, but I don't see the share settings that would indicate guest access is enabled.

Note, you should restart the SMB service after any changes to shares or the service itself. Your testparm -s doesn't seem to reflect what's actually in operation. Please restart the SMB service, and run that command again.
 
Last edited:

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
Set your NASBackup1 share to be browseable. Is this a guest share? Guest shares won't prompt for logins, but I don't see the share settings that would indicate guest access is enabled.

I did try enabling guess access at one point. It did not change anything. However it is not enabled at this point. It appears, it is browseable.

truenas4.jpg


This data is backed up many places, across many machines, ideally, it would not require a password. I would like all the PCs and users on the the network to just be able to see the pool, access the data and use it freely. It should just be another drive for them.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, set your share to allow guest access, and add guest only = yes to the Aux parameters to that share. Then restart the SMB service for those changes to take effect. On the Windows 10 side, you have to set DWORD AllowInsecureGuestAuth="00000001" in Registry path HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters and restart the Workstation service.
 

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
OK, set your share to allow guest access, and add guest only = yes to the Aux parameters to that share. Then restart the SMB service for those changes to take effect. On the Windows 10 side, you have to set DWORD AllowInsecureGuestAuth="00000001" in Registry path HKLM\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters and restart the Workstation service.

Tried that, still no luck. It could be nothing, but it seemed to fail slightly faster? Just to make sure I hadn't messed anything up, Linux does still see and can write to the NAS, with these new settings no user name / password is required (as expected).

I assume this is what I should see in windows?

truenas5.jpg
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Yes, it appears we're on the right track, as you now have visibility to your TrueNAS. Question: How are you restarting the SMB service on TrueNAS? Are you toggling the slider in the SMB service to inactive and then back to active?

1636754418239.png


Also, please supply the output of testparm -s again.
 

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
Yes, it appears we're on the right track, as you now have visibility to your TrueNAS. Question: How are you restarting the SMB service on TrueNAS? Are you toggling the slider in the SMB service to inactive and then back to active?

View attachment 50736

Also, please supply the output of testparm -s again.

I honestly just restarted the entire system. Should I toggle the slider instead? Appreciate all your help.

Here is the output again:

Code:
root@truenas[~]# testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Weak crypto is allowed
Server role: ROLE_STANDALONE

# Global parameters
[global]
        aio max threads = 2
        bind interfaces only = Yes
        disable spoolss = Yes
        dns proxy = No
        enable web service discovery = Yes
        kernel change notify = No
        load printers = No
        logging = file
        map to guest = Bad User
        max log size = 5120
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        registry shares = Yes
        server role = standalone server
        server string = TrueNAS Server
        unix extensions = No
        username map = /usr/local/etc/smbusername.map
        username map cache time = 60
        idmap config *: range = 90000001-100000000
        idmap config * : backend = tdb
        directory name cache size = 0
        dos filemode = Yes


[NASBackup1]
        ea support = No
        guest ok = Yes
        guest only = Yes
        kernel share modes = No
        path = /mnt/NASBackup1/NetworkBackup
        posix locking = No
        read only = No
        vfs objects = streams_xattr shadow_copy_zfs ixnas aio_fbsd
        nfs4:chown = true
exit
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, what does /var/log/samba4/log.smbd show when you try to connect from Windows?
 

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
OK, what does /var/log/samba4/log.smbd show when you try to connect from Windows?

Ah Ha, perhaps a clue? I opened the log after trying to access the NAS multiple times from the Windows machine, as I'm still not entirely sure what the path might be. (Linux just sees and you click on it, no path to figure out)

So I left this log file in tact as I don't know what is useful. However right away I noticed there is nothing with a time stamp from the times I was trying to access it from my windows machine (17:50 ~ish).

Code:
[2021/11/11 18:49:24.110398,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/11 18:49:24.118270,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 2178
[2021/11/11 18:49:24.650477,  1] ../../source3/smbd/files.c:307(file_init_global)
  file_init_global: Information only: requested 218232 open files, 59392 are available.
[2021/11/11 18:49:24.720227,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/11/11 19:39:36.451353,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/11 19:39:36.459865,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1185
[2021/11/11 19:39:36.621782,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/11 19:39:36.624294,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1205
[2021/11/11 19:39:36.624762,  0] ../../lib/util/pidfile.c:197(pidfile_create)
  ERROR: smbd is already running. File /var/run/samba4/smbd.pid exists and process id 1187 is running.
[2021/11/11 19:39:37.015581,  1] ../../source3/smbd/files.c:307(file_init_global)
  file_init_global: Information only: requested 218232 open files, 59392 are available.
[2021/11/11 19:39:37.023269,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/11/11 19:47:50.143289,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/11 19:47:50.151796,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1185
[2021/11/11 19:47:50.303630,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/11 19:47:50.306277,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1205
[2021/11/11 19:47:50.306799,  0] ../../lib/util/pidfile.c:197(pidfile_create)
  ERROR: smbd is already running. File /var/run/samba4/smbd.pid exists and process id 1187 is running.
[2021/11/11 19:47:50.692136,  1] ../../source3/smbd/files.c:307(file_init_global)
  file_init_global: Information only: requested 218232 open files, 59392 are available.
[2021/11/11 19:47:50.698273,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/11/11 20:09:54.225837,  1] ../../source3/smbd/service.c:355(create_connection_session_info)
  create_connection_session_info: guest user (from session setup) not permitted to access this share (IPC$)
[2021/11/11 20:09:54.225882,  1] ../../source3/smbd/service.c:544(make_connection_snum)
  create_connection_session_info failed: NT_STATUS_ACCESS_DENIED
[2021/11/11 20:21:47.511433,  1] ../../source3/smbd/service.c:355(create_connection_session_info)
  create_connection_session_info: guest user (from session setup) not permitted to access this share (IPC$)
[2021/11/11 20:21:47.511480,  1] ../../source3/smbd/service.c:544(make_connection_snum)
  create_connection_session_info failed: NT_STATUS_ACCESS_DENIED
[2021/11/11 20:21:52.494598,  1] ../../source3/printing/printer_list.c:234(printer_list_get_last_refresh)
  Failed to fetch record!
[2021/11/11 20:21:52.494662,  1] ../../source3/smbd/server_reload.c:66(delete_and_reload_printers)
  pcap cache not loaded
[2021/11/11 20:22:34.180799,  1] ../../source3/printing/printer_list.c:234(printer_list_get_last_refresh)
  Failed to fetch record!
[2021/11/11 20:22:34.180841,  1] ../../source3/smbd/server_reload.c:66(delete_and_reload_printers)
  pcap cache not loaded
[2021/11/11 20:29:16.199459,  1] ../../source3/smbd/service.c:355(create_connection_session_info)
  create_connection_session_info: guest user (from session setup) not permitted to access this share (IPC$)
[2021/11/11 20:29:16.199500,  1] ../../source3/smbd/service.c:544(make_connection_snum)
  create_connection_session_info failed: NT_STATUS_ACCESS_DENIED
[2021/11/11 20:29:27.266776,  1] ../../source3/printing/printer_list.c:234(printer_list_get_last_refresh)
  Failed to fetch record!
[2021/11/11 20:29:27.266818,  1] ../../source3/smbd/server_reload.c:66(delete_and_reload_printers)
  pcap cache not loaded
[2021/11/12 11:36:36.653920,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/12 11:36:36.692099,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1187
[2021/11/12 11:36:36.844929,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/12 11:36:36.847602,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1207
[2021/11/12 11:36:36.848176,  0] ../../lib/util/pidfile.c:197(pidfile_create)
  ERROR: smbd is already running. File /var/run/samba4/smbd.pid exists and process id 1189 is running.
[2021/11/12 11:36:37.145892,  1] ../../source3/smbd/files.c:307(file_init_global)
  file_init_global: Information only: requested 218232 open files, 59392 are available.
[2021/11/12 11:36:37.163665,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/11/12 13:49:43.535010,  0] ../../source3/smbd/server.c:958(smbd_accept_connection)
  accept: Software caused connection abort
[2021/11/12 14:29:34.779328,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/12 14:29:34.807704,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1187
[2021/11/12 14:29:34.957565,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/12 14:29:34.960186,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1207
[2021/11/12 14:29:34.960632,  0] ../../lib/util/pidfile.c:197(pidfile_create)
  ERROR: smbd is already running. File /var/run/samba4/smbd.pid exists and process id 1189 is running.
[2021/11/12 14:29:35.350702,  1] ../../source3/smbd/files.c:307(file_init_global)
  file_init_global: Information only: requested 218232 open files, 59392 are available.
[2021/11/12 14:29:35.357448,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/11/12 15:49:56.057860,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/12 15:49:56.085454,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1187
[2021/11/12 15:49:56.221720,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/12 15:49:56.224462,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 1207
[2021/11/12 15:49:56.225125,  0] ../../lib/util/pidfile.c:197(pidfile_create)
  ERROR: smbd is already running. File /var/run/samba4/smbd.pid exists and process id 1189 is running.
[2021/11/12 15:49:56.639078,  1] ../../source3/smbd/files.c:307(file_init_global)
  file_init_global: Information only: requested 218232 open files, 59392 are available.
[2021/11/12 15:49:56.646094,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/11/12 15:55:31.383684,  1] ../../source3/printing/printer_list.c:234(printer_list_get_last_refresh)
  Failed to fetch record!
[2021/11/12 15:55:31.383753,  1] ../../source3/smbd/server_reload.c:66(delete_and_reload_printers)
  pcap cache not loaded
[2021/11/12 17:37:41.589891,  0] ../../source3/smbd/server.c:1784(main)
  smbd version 4.13.14 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2020
[2021/11/12 17:37:41.593332,  1] ../../source3/profile/profile.c:55(set_profile_level)
  INFO: Profiling turned OFF from pid 2803
[2021/11/12 17:37:41.732996,  1] ../../source3/smbd/files.c:307(file_init_global)
  file_init_global: Information only: requested 218232 open files, 59392 are available.
[2021/11/12 17:37:41.736579,  0] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'smbd' finished starting up and ready to serve connections


So go to another PC real quick (Linux box) pull up the NAS for a sanity check (these lines get added to the log):

Code:
[2021/11/12 18:00:32.147411,  1] ../../source3/printing/printer_list.c:234(printer_list_get_last_refresh)
  Failed to fetch record!
[2021/11/12 18:00:32.147467,  1] ../../source3/smbd/server_reload.c:66(delete_and_reload_printers)
  pcap cache not loaded


So it appears it I did pull it correctly and it's working. Perhaps Windows is not actually reaching out correctly?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
So it appears it I did pull it correctly and it's working. Perhaps Windows is not actually reaching out correctly?

What does the Windows Event Viewer show for SMBclient?
 

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
What does the Windows Event Viewer show for SMBclient?

In the audit section I have nothing.

In the connectivity section I have Errors. Primarily of this sort:

Code:
The server name cannot be resolved.

Error: The requested interface is not supported.

Server name: 192.168.1.4


I have a few taged information as well, but they appear to be when I was trying things, enabling disabling SMB, things like that?

Nothing under Operational.

Security a bunch of Warnings (which appears to be normal, from the setting / change we made above):

Code:
The AllowInsecureGuestAuth registry value is not configured with default settings.

Default Registry Value:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"AllowInsecureGuestAuth"=dword:0
Configured Registry Value:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"AllowInsecureGuestAuth"=dword:1

Guidance:
This event indicates that an administrator has enabled insecure guest logons. An insecure guest logon occurs when a server logs the user on as an unauthenticated guest, typically in response to an authentication failure. Guest logons do not support standard security features such as signing and encryption. As a result, allowing guest logons makes the client vulnerable to man-in-the-middle attacks that can expose sensitive data on the network. Windows disables insecure guest logons by default. Microsoft does not recommend enabling insecure guest logons.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, so it looks like a name resolution issue. In a Command Prompt, what happens when you ping truenas?
 

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
OK, so it looks like a name resolution issue. In a Command Prompt, what happens when you ping truenas?

No reply lower case or uppercase? (is it case sensitive) I do get a reply if I ping 192.168.1.4.

If I add 192.168.1.4 truenas to the hosts file, then I can ping truenas and get a reply. However that doesn't seem to solve the problem either?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Do you have DNS servers specified in TrueNAS under Network->Global Configuration? Usually, your home router is also a DNS server. When TrueNAS boots, it registers its hostname with the DNS server here. You shouldn't need to use hosts file entries.
 

OhioYJ

Dabbler
Joined
Nov 11, 2021
Messages
16
Do you have DNS servers specified in TrueNAS under Network->Global Configuration? Usually, your home router is also a DNS server. When TrueNAS boots, it registers its hostname with the DNS server here. You shouldn't need to use hosts file entries.

I did not specify a DNS on the TrueNAS, under DNS servers it still just says Nameserver 1, 2, 3 like default. I do have a custom DNS specified on my router (I don't think that matters though).
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
What DNS servers do you have specified on the Windows 10 boxes? Do you have SMB1 enabled on the Windows 10 boxes?
 
Top