Jump to content

FreeNAS: SMB share inaccessible if accessing folder with different "owner" (SOLVED)

Go to solution Solved by Razor Blade,

Well after pounding my face on my keyboard until I found some answers I ran across this thread.

 

https://social.technet.microsoft.com/Forums/ie/en-US/f3ee2c61-a5c7-48b3-a3bf-23ea323da699/connecting-to-multiple-shares-on-a-single-server-with-multiple-credentials-system-error-1219-?forum=itprovistanetworking

 

4th from the last post seems to mention a solution to kill off the rogue connection. Restart the "Workstation" service.

 

solutionSMB.PNG.613389eb50a525314074e5eccea2cfe8.PNG

 

I tried it twice and it resolved the issue both times. I'll report back if anything changes.

Did I mention how much I hate Windows today yet?

 

So hopefully this makes sense. I have multiple shares using SMB in FreeNAS 11. Basically I only use the SMB share as a crude way to put my archive behind a login thereby making it inaccessible until I need it. For day to day use and everything else I just use iSCSI. To make Plex work with FreeNAS I needed to create an SMB share with guest access. Simple enough...except I accidentally accessed it with guest access enabled and with "root" as owner instead of the username I typically use for my SMB shares. Basically Windows cockblocked me out of all my other shares giving me a message like this...

 

1111.PNG.829a5c966dcca2daaa98b9836efcc096.PNG

 

Well okay no problem... just get into command prompt and with "net use" I'll just dele..t...e.....uuuhh...

 

2222.PNG.cbe1fea3411f5589bec3cf47a635a993.PNG

 

WTF?

 

I know the problem is Windows as I can access the share from my laptop without any problem. All the research I could find continually pointed to "net use" which is not the issue. Credential manager also did not show any credentials to that share.

 

So starts the tail chasing and hair pulling... I tried

  • resetting network adapters (as in disabling and re enabling them)
  • disabling and re-enabling various and random network services on the adapter
  • tried a different adapter
  • tried changing the owner back to my typical username and disabled guest access which only locked me out of the guest share folder.
  • tried using the net use * \\server\share /user: username which said it worked but did not... after I used net use */delete which succeeded but made no difference.
  • deleting and recreating the shares hoping Windows would give up whatever binding it made with the guest access...to no avail

During various steps I also threw in the typical procedure after changes...

  • restarting explorer from task manager
  • logging out and back in
  • rebooting the computer completely

 

I swear to the Holy Mother I was so close to just reinstalling Windows...But then I stumbled upon the only thing that worked...using this unfortunate option...

 

3333.PNG.f4b33dc4dd91dac979e28546e1d07aae.PNG

 

They weren't kidding... It kills everything...After that...and redoing all of my network settings, I was finally able to login using my username and access the share.

 

I don't know if I found a bug or what...Has anyone run into this issue? Why the heck did Windows seemingly bind to the root owner guest access and never let go? To be clear, I did get it working... but I don't feel like I found the cause of the problem other than Windows once again boning me out of another night of trying to get something that should be simple to work.

There's no place like ~

Spoiler

Problems and solutions:

 

FreeNAS

Spoiler

Dell Server 11th gen

Spoiler

 

 

 

 

ESXI

Spoiler

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

thats samba for you . ive had it as simple as reboot the linux host and the windows box that wanted the share and it works from not working at all before the reboots .ive gotten lazy and now use filezilla since i dont want to set it up for ubuntu now. it might be a windows bug but it was probably samba being a pain

main rig

Spoiler

 corsair 750d | evga 1000w g2 | Gigabyte x99 soc champ | 5820k 4.0GHz | 1tb wd blue | 250gb samsung 840 evo  | Crucial Ballistix Sport XT 16GB 8x2 DDR4-2400 | MSI GTX 970 x2 | monitor Acer B286HK 28" 4K | razor chroma blackwidow  | razor death adder chroma

CENTOS 7 SERVER (PLEX&docker stuff)

Spoiler

NZXT s220 | evga 500w 80+ | AMD FX 8320e | ASUS M5A78L-M/USB3 | 2x8gb non ecc ddr3 WD red 2TBx2 | seagate 160gb microcenter 8gb flashdrive OS

 

Link to comment
Share on other sites

Link to post
Share on other sites

9 hours ago, gamerking said:

thats samba for you . ive had it as simple as reboot the linux host and the windows box that wanted the share and it works from not working at all before the reboots .ive gotten lazy and now use filezilla since i dont want to set it up for ubuntu now. it might be a windows bug but it was probably samba being a pain

So you think maybe SMB bound the credentials maybe? I thought it may have been server side which was why I tried a different computer. But then again I don't have active directory and the other computer has a different account than the PC I was using. I will have to read more into Samba as I admit I don't have a lot of knowledge in it.

There's no place like ~

Spoiler

Problems and solutions:

 

FreeNAS

Spoiler

Dell Server 11th gen

Spoiler

 

 

 

 

ESXI

Spoiler

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

i dont know much about samba either just the 5 min guides to set it up are either read all this then pray it works or you need a smb.conf file set perfectly for it to work . enable ssh and use filezilla dead simple same pass/user as you  would use to ssh into it for a terminal session . i woudlnt say it bound the creds just one side wont accept them till a reboot is done on the side of the smb thats unhappy rebooting all the machines solves this lets you move to more of a pain in the ass ones to troubleshoot ie ip works thur windows but when you try to add the share directory thur map drive it goes back to being a pain in the ass with cant open or no read and or write access ect.

main rig

Spoiler

 corsair 750d | evga 1000w g2 | Gigabyte x99 soc champ | 5820k 4.0GHz | 1tb wd blue | 250gb samsung 840 evo  | Crucial Ballistix Sport XT 16GB 8x2 DDR4-2400 | MSI GTX 970 x2 | monitor Acer B286HK 28" 4K | razor chroma blackwidow  | razor death adder chroma

CENTOS 7 SERVER (PLEX&docker stuff)

Spoiler

NZXT s220 | evga 500w 80+ | AMD FX 8320e | ASUS M5A78L-M/USB3 | 2x8gb non ecc ddr3 WD red 2TBx2 | seagate 160gb microcenter 8gb flashdrive OS

 

Link to comment
Share on other sites

Link to post
Share on other sites

In my experience the problem is almost ALWAYS with Windows, although it usually goes way with a reboot or even just logging out and back in, unless you saved the credentials in which case I cannot remember how you revert that.

Router:  Intel N100 (pfSense) WiFi6: Zyxel NWA210AX (1.7Gbit peak at 160Mhz)
WiFi5: Ubiquiti NanoHD OpenWRT (~500Mbit at 80Mhz) Switches: Netgear MS510TXUP, MS510TXPP, GS110EMX
ISPs: Zen Full Fibre 900 (~930Mbit down, 115Mbit up) + Three 5G (~800Mbit down, 115Mbit up)
Upgrading Laptop/Desktop CNVIo WiFi 5 cards to PCIe WiFi6e/7

Link to comment
Share on other sites

Link to post
Share on other sites

15 hours ago, Alex Atkin UK said:

In my experience the problem is almost ALWAYS with Windows, although it usually goes way with a reboot or even just logging out and back in, unless you saved the credentials in which case I cannot remember how you revert that.

I know for a fact it is a Windows problem.

 

 

After screwing around with it again I found that opening my guest share first, then my share that requires login, the same error pops up. Restart explorer and access login share first, it works fine. If I didn't mind spending rest of the night re-configuring every damn network device, I would change the owner to root and see if I get the original problem again. But alas I think I would rather walk barefoot on broken glass.

 

So my theory is somewhere Windows binds "users" to SMB shares on an IP address. If there is no password it won't show on net use. Back when root owned the share Windows didn't give it up. But when I changed the owner to the same user but gave guest access Windows associated guest access with the username then for whatever reason once the other share required credentials, Windows treated that as a different connection.

 

I realize that I am probably not using SMB the way intended, however it is a convenient way to lock up my Archive without trying to source/install plugins and software...

There's no place like ~

Spoiler

Problems and solutions:

 

FreeNAS

Spoiler

Dell Server 11th gen

Spoiler

 

 

 

 

ESXI

Spoiler

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Update...

 

Still fighting this. Network reset actually doesn't work. It must have been a coincidence when it did. Or maybe if the owner of the share is different than the credentials you try to log in as with the other share... Windows has to "give up" the connection all on it's own. I've looked to see if it is indexing the share or caching something.... ANYTHING that would explain why Windows decides it is so damn important to keep a connection to a guest share open after closing it.

 

The only thing I can do is disable networking and wait for about 30 minutes then re-enable. I really wish I could find out where Windows is storing that connection so I know how to terminate it.

 

The only way I can prevent the problem is to login to my share before visiting any shares with "guest" privileges enabled.

There's no place like ~

Spoiler

Problems and solutions:

 

FreeNAS

Spoiler

Dell Server 11th gen

Spoiler

 

 

 

 

ESXI

Spoiler

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Ironically since my post I hit this exact same problem.

 

I had a drive letter mapped for a samba share and somehow it was using different credentials so blocking my normal user login, I unmapped that share which allowed me to login with my normal credentials.

 

The important thing is as it says, you can only use one user at a time for remote shares.  Not sure if that is per server or per Windows login.

Router:  Intel N100 (pfSense) WiFi6: Zyxel NWA210AX (1.7Gbit peak at 160Mhz)
WiFi5: Ubiquiti NanoHD OpenWRT (~500Mbit at 80Mhz) Switches: Netgear MS510TXUP, MS510TXPP, GS110EMX
ISPs: Zen Full Fibre 900 (~930Mbit down, 115Mbit up) + Three 5G (~800Mbit down, 115Mbit up)
Upgrading Laptop/Desktop CNVIo WiFi 5 cards to PCIe WiFi6e/7

Link to comment
Share on other sites

Link to post
Share on other sites

Well after pounding my face on my keyboard until I found some answers I ran across this thread.

 

https://social.technet.microsoft.com/Forums/ie/en-US/f3ee2c61-a5c7-48b3-a3bf-23ea323da699/connecting-to-multiple-shares-on-a-single-server-with-multiple-credentials-system-error-1219-?forum=itprovistanetworking

 

4th from the last post seems to mention a solution to kill off the rogue connection. Restart the "Workstation" service.

 

solutionSMB.PNG.613389eb50a525314074e5eccea2cfe8.PNG

 

I tried it twice and it resolved the issue both times. I'll report back if anything changes.

There's no place like ~

Spoiler

Problems and solutions:

 

FreeNAS

Spoiler

Dell Server 11th gen

Spoiler

 

 

 

 

ESXI

Spoiler

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Its funny as I never think of restarting services on Windows despite the fact that is practically the first thing I would try on Linux.  Just so used to the concept that Windows "does its own thing".

 

So much for Windows being more user-friendly than Linux eh. ;)

Router:  Intel N100 (pfSense) WiFi6: Zyxel NWA210AX (1.7Gbit peak at 160Mhz)
WiFi5: Ubiquiti NanoHD OpenWRT (~500Mbit at 80Mhz) Switches: Netgear MS510TXUP, MS510TXPP, GS110EMX
ISPs: Zen Full Fibre 900 (~930Mbit down, 115Mbit up) + Three 5G (~800Mbit down, 115Mbit up)
Upgrading Laptop/Desktop CNVIo WiFi 5 cards to PCIe WiFi6e/7

Link to comment
Share on other sites

Link to post
Share on other sites

To wrap this up, I've made a (poorly written) batch file for anyone that cares...or has this problem happen a lot.

 

@echo off
title WORKSTATION RESTART
echo stopping workstation service...
NET stop "workstation"
echo restarting workstation service...
NET start "workstation"
cls
echo workstation service has been restarted!!
pause

 

Just copy it into notepad and save it as a .bat file. It will kill off all your SMB connections so be aware of that...so...you know...don't run it if you're transferring a file or something. To be fair it will warn you and make you type "y" to close connections and again warning you that "computer browser" relies on the service while stopping it.

 

EDIT 1: you will need to run it as administrator!

There's no place like ~

Spoiler

Problems and solutions:

 

FreeNAS

Spoiler

Dell Server 11th gen

Spoiler

 

 

 

 

ESXI

Spoiler

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×