I disabled network file and printer sharing on a very low level and dont remember how. No registry backups or system restore points available

Hi,

Abstract:

I messed up, and learned my lesson. Next time to document all the commands I do and to always create system restore points before I experiment like this.

I now realize that SMB 2 and 3 are linked together and disabling SMB2 on windows 10 also disabled SMB3 but I didnt figure this out after a restart and I had already done alot of commands before that restart which I did not log.

At no point did I follow or even consider following those guides that have you to enable SMB 1.0, disable firewall, etc. Those guides are very stupid.

This computer is very important and i cannot just re-format it and install a new windows installation.

What I did:

I was trying to disable windows SMB v2 on my system last night, I was disabling server and client and i didnt realise I needed to restart my system. Regardless I thought I was un-doing my commands by re-enabling smb2 features as shown in the microsoft doc’s i followed (see one tab link) Anyway, later I restarted my system and now my computer will permanently disable network file and printer sharing on private networks: see my gif I recorded of whats going on:

as a result I cannot access any of my network drives (yes the server is online, and other clients on the same network are connected to it right now)

I was also mainly focusing on enabling encryption and signing on my server side, which now is enabled and other clients are using encryption and signing. But last night I was mainly messing with my windows 10 smb client and server settings. I did alot of work in an Admin powershell

I did some registry commands which I later reverted by doing the commands that I thought re-enabled smbv2 client.

Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB2 -Type DWORD -Value 1 -Force

Here are the admin powershell commands I did to revert my changes and re-enable smb2/v3 client

sc.exe config lanmanworkstation depend= bowser/mrxsmb10/mrxsmb20/nsi 
sc.exe config mrxsmb20 start= auto

and also did something in group policy editor which I thought I undid. the screenshot im showing is the only place I changed in the group policy within my GUI and whats shown should be normal and not causing file and printer sharing to constantly turn off, but i still am going to log that “i was here”

Here is a big screenshot of vaerious SMB registry, lanmanworkstation status’, server and client status’s executed in powershell.

Is there any kind of event viewing I can do to see what happens when I try and re-enable file and printer sharing, and then it disables itself again?

Here are most of the relevant links that I was browsing and trying commands from before file sharing was permanently disabled after a reboot.

https://www.one-tab.com/page/TqOmojzJT2KRkrCMERanQw

I went through it all but maybe I missed something.

Here is a screenshot of various status commands for SMB server and client.

Is there any expert on SMB/File Sharing here that can help?

The first two GIF’s appear to be grey’ed out, theyre imgur links, i tried to upload the gifs manually to here in a post edit, but it says i cannot edit the post because i cannot include links. Smoge.

Here are what those first two gifs are supposed to be

OfczfMP

OEzwNNB

open control panel
programs and features
add/remove windows featurers.
scroll down to smb and clear it.
this will uninstall it.
reboot
go back to add/remove windows features and enable smb again,
this will install it a fresh and should restart any services that were previously disabled.

you will likely have to go back into group policy and remove any changes you made.

1 Like

Thank you so much for the suggestion.

I tried something like this just before I went to bed last night out of frustration. It did not solve the problem.

I did it just now anyway. As you requested, I turned off smb direct, restarted, turned it on, restarted, and my drives are still unreachable. I still have the issue where I cannot turn on “file and printer sharing” in network sharing settings.
The first gif in my comment above your suggestion shows what is still happening even after your suggestion

Sometimes you just gotta throw the whole OS out and reinstall

I’ve been putting off doing it myself

Nooooooooooo :sob:

I really don’t want it to come to that, and i want to instead have this be a learning experience. maybe ill eureka moment in a week or maybe someone one these forums can bump me in the right direction.

If it REALLY comes down to it, ill use this as an opportunity to install windows 10 enterprise or switch to linux and do everything i need windows for through gpu passthrough KVM’s.

oh my god you guys are my last hope. the moderators at “learn(dot)microsoft(dot)com/” removed my cry for help (this post) and didnt give me a reason.

the places to disable smb are in group policy editor.
powershell
cmd
and services.

so go into services and make sure that services needed for smb are enabled and set to at least manual.

open a run box and type fsmgmt.msc
this will open the MMC and allow you to edit your shares.
if it doesnt start look up the error it gives.

also in one of your posts you say administrator configured… have you loged in with the administrator account and tried everything from that one rather than an elevated user account?

  1. Open ‘Run’ with [Windows] + [R].

  2. Type ‘cmd’ and press [Ctrl] + [Shift] + [Enter].

  3. Type ‘net user administrator /active:yes’.

  4. The administrator account is now activated.
    now log out of the user account, on the lock screen select the admin account…

  5. To deactivate: ‘net user administrator /active:no’.

once your on the admin account go through this microsoft link
and 1 by 1 go down that list.
if its still not working after that. im out of ideas

@HEXiT

Thank you so much for that suggestion.

I am not sure which services you were reffering to in services to make sure were enabled. Could you clarify?

fsmgmt.msc opens without error.

I ran “net user administrator /active:yes” and this seemed to have prompt me when i typed Set

-SmbServerConfiguration -EnableSMB2Protocol $true

which i dont remeber it doing before when I went down that list earlier today. Anyways, I went down the list, here is my proof:

After that I restarted my system and loaded back up. This time, when I try to connect to a network drive, it almost instantly says no and returns an error, asks to help diagnose the problem but in the end it cannot fix it. see:

So something is happening now, wireshark sees something is trying to reach out to port 445 whereas before it wasnt. Im going to go have some dinner and look deeper into what wireshark was telling me.

(aw man these images get really compressed, the error code on the right side is 0x800704b3)

The issue i still have is that this happens:
“turn off file and printer sharing” keeps automatically being selected when I try to select “turn it on”

OfczfMP

go into services and see if print spooler is disabled along with Function Discovery Resource Publication, DNS Client, SSDP Discover, UPnP Device Host and Server services.
also check network discovery services and plug and play are all enabled and running.
(these services being enabled should allow you to finally turn on file and printer sharing on that account)

also try running these two in an elevated cmd.

DISM.exe /Online /Cleanup-image /Restorehealth

sfc /scannow
if sfc/scannow finds anything let it repair and run it again till you see no repairs.

edit when your re-enabling services, check the service dependancies and make sure they are enabled and set to manual (at least) also.

Print Spooler -- Running - Automatic
Function Discovery Resource Publication -- Running - Manual(trigger start)
DNS Client -- Running - Automatic (trigger start)
SSDP Discovery -- Running - Manual
UPnP Device Host -- **NOT RUNNING** - Manual
Server -- Running - Automatic (Trigger Start)

I turned on UPnP services, and set it to automatic.
I restarted my computer and “turn on file and printer sharing” keeps turning itself off still.

Under “Control Panel\Network and Internet\Network and Sharing Center\Advanced sharing settings” Turn on network discovery is ticked “on”

I looked into plug and play, it just looks like its for printers and parallel ports or something? im not sure its relevant here. Ill ignore it for now.

Mapping network drive… Still does not work.
file and printer sharing keeps reverting itself back to “turned off”

Now onto trying the magical commands… brb.

Whats the difference between UAC authentication on a Administrative account running powershell in administrator mode, versus that, but also running “net user administrator /active:yes”?

enable upnphost and plug and play helps windows discover new hardware on the system. its not just for detecting your mouse and keyboard when you plug them in.
pretty much every external device is detected by pnp.

is a dedicated clean admin account. with nothing installed but all permissions at default.
all default services running…
and as its admin it should allow you to set permissions for other users.

yes its the same as a normal user admin account. but as i said its clean with default settings.
so a good place to start to see if something is broken on the system or just the user account.

I ran the magical commands

it looked promising. No luck after a reboot though.

this: still keeps happening

OfczfMP

Here is a log of what sfc /scannow found and fixed

pastebin(dot)com/Us6XEmgA

After a computer reboot, net user administrator /active:yes turns off, correct? Its only for the current powershell process thats open?

also looking at your upnphost isnt running but set to manual.
it should be running which means its failed a dependancy.

image_2022-12-01_010018281

as you can see there are a few to check. :frowning: and yeah this part of it sux.

on the off chance. have you disabled any services on your Ethernet adapter?.
such as microsoft qos service or microsoft neworking?.

image_2022-12-01_010831447

see the second one down (i have it disabled) enable it if its like mine.
oh and also check the sharing tab in the above…

Aha! thats what you meant by check dependencies for UPNP.

RPC Endpoint Mapper -- Running - Automatic 
DCOM Server Process Launcher -- Running - Automatic
Remote Procedure Call (RPC) -- Running - Automatic
(side note, RPC Locator is not running and set to manual, though its not a dependency, just a note).
Network Store Interface Service -- Running - Automatic
SSDP Discovery -- Running - Manual

It seems all the dependencies are running as they should.

Maybe the magic commands fixed them or setting UPnP to automatic fixed it?

Anyway, my ethernet adapter should all be up and running. btw, your file and printer sharing for microsoft networks is disabled :wink: I already tried the trick to un-tick that, press apply, and then re-tick that. still doesnt work.

Im going to try my other ethernet port.
Nope. doesnt fix anything after turning on file and printer sharing, it keeps turning itself off.
Guess ill just be on Ethernet adapter now and not Ethernet 2

when you discover the device network did you put it in public or home network?
if you put it in public then sharing is disabled.

its the only thing left i can think of that will stop sharing working…

No. I think It already was connected to it as some point in the past, it did not ask me. It just defaulted to private. I guess I set it to “home” in the past.

If I have to reinstalling the system, I have a chance to start fresh I guess.

On a completely un-related note. Will this work for me the way I think it will?
Is this a good way for a home lab enthusiast to get Enterprise Windows for home machines?

www(dot)ebay(dot)com/itm/324996085177