How to disable administrative shares in Windows

A lot of system admins tend to ask me a simple question: How to do what's in the title? Well it's simple really: All you need is a small Registry hack and You're on Your merry way.

That said, just do the following: Open regedit and add this DWORD with Value 0 at the branch bellow (or You can just merge this into Your Registry - be mindful and backup the Registry before you do any of this):

Windows Registry Editor Version 5.00


Now restart Your computer and in the CLI type “net share”. You should see that there are no more C$, D$, ADMIN$ shares present.

Voilà! You've done it and now you can sleep soundly knowing that no security audit ever again will be able to kidnap Your XP machine because You've forgotten to set an admin password to it ;)

A word to the wise though: Bear in mind that some programs expect the administrative shares to be present, so disabling those shares may cause those programs to fail or generate error messages. If that happens, enable the shares by opening the Registry Editor and either deleting the AutoShareWks setting or changing its value to 1.

Enter your comment:
214 +3​ = 
  • windows/misc/disable_admin_shares.txt
  • Last modified: 2019-10-31 09:06
  • (external edit)