Recommended Posts

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...

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

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...

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.

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

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

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.

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.

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.

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.

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...

Link to post

Share on other sites

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.

Link to post

Share on other sites

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.

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.