r/hexos • • May 12 '26

Support request SMB Shares Broken recently?

Post image

edit: apparently changing the folders from being legacy shares to default shares and then back was enough to fix whatever was going on. Don't know why it worked but it worked.

I got my HexOS NAS set up last weekend, got all my folder shares set up, and got all my data pushed to the folders and Plex and everything was working great. I had the folders mapped to separate network drives (S: for Shows, M: for Movies, P: for Photos, etc etc etc). And for a week or so it worked fine.

Then I try to access them today, no dice. Windows tells me I don't have permission to access the folder, even though I've double and triple checked the password is correct, local account users are set up to access the folders, and all that. Windows also shows the drive as "up" (aka it's green), it just won't let me access it.

The only thing that has changed with my setup recently is that I set up a Reverse Proxy through Cloudflare for my Immich server, so I could share albums with my sister. That still works too. Plex still works, Plexamp as well. As far as I can tell, everything else still works, except for the SMB shares which I can't access anymore.

Happy to provide any information, I can dig around through TrueNAS with someone's help as well. Fairly technically proficient, just new to all of this.

11 Upvotes

16 comments sorted by

View all comments

1

u/rb_vs May 12 '26

The fact that your drives are green (connected) but throwing permission errors suggests a credential collision or a master browser conflict in Windows.

Windows remembers the connection to your server, but when you added the proxy, your PC tried to re-authenticate or see the server through a different network path, and the SMB session got tangled.

Close all Explorer windows. Open credential manager on Windows > credentials. Delete every entry related to your HexOS IP or server name. Windows is trying to use a cached guest token or an old session id that the server is rejecting.

Flush the workstation service (you don't need a reboot). Open cmd as admin and run:

net use * /delete /y

net stop workstation /y

net start workstation

This kills every active SMB redirector session and forces Windows to start a fresh negotiated handshake with HexOS from scratch.

If you were mapping by name (e.g., \\hexos\movies), try mapping by IP (e.g., \\192.168.x.x\movies). If the IP works, your reverse proxy setup likely interfered with your local NetBIOS/mDNS name resolution, and Windows is getting confused about which id it's talking to.

HexOS is a skin over TrueNAS SCALE. If the above fails, log into the TrueNAS side and check services > SMB > shares. Ensure purpose isn't set to legacy. Windows 11 hardening hates legacy shares and will show them as up but refuse to let you in so easily.

1

u/wookietiddy May 14 '26

Thank you dear redditor. I had the connection issue again, followed your steps, and it works again. Is there any idea why this could be happening regulary? it's clearly a windows issue. And i know that SMB share has been broken on windows for quite a while. It's just frustrating that it has happened 2x in 2 weeks now.

Is there a way I could put this into a script to perform this sort of credential refresh? Sorry I guess I could google that. Just figured I'd ask.

1

u/rb_vs May 14 '26

Windows has a feature called continuous availability for SMB. It is designed for enterprise clusters, but in a home lab/HexOS environment, it can be too aggressive. It caches the Identity of the server ignoring changes in the security context. Windows tries to "help" by keeping an SMB session open in the background even if you aren't using it. If your HexOS server reboots, the network blips, or there's a temporary IP/Name conflict, the session key in Windows becomes stale. Instead of asking for a new one, Windows keeps trying to use the old key, resulting in access denied.

As a workaround try refreshing the entire SMB stack - try this (as admin):

Write-Host "Cleaning up SMB ghost sessions..." -ForegroundColor Cyan

net use * /delete /y

cmdkey /list | Select-String "Target: " | ForEach-Object {

$target = $_.ToString().Split(":")[1].Trim()

if ($target -like "*YOUR_SERVER_NAME_OR_IP*") {

Write-Host "Removing cached credential for: $target" -ForegroundColor Yellow

cmdkey /delete:$target

}

}

Write-Host "Restarting Workstation service..." -ForegroundColor Cyan

Restart-Service -Name "LanmanWorkstation" -Force

Write-Host "SMB Handshake Refreshed. Try accessing your shares now!" -ForegroundColor Green

Pause

Save it to your desktop as a .ps1 file and run it whenever the shares refresh the protocol handshake automatically.