Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What's the best way to temporarily disable the Windows 2003 File Sharing service(s)? Sorta like the equivalent to shutting down Samba on a Linux box.

share|improve this question
up vote 4 down vote accepted

You can stop the "Server" service. This is going to stop the "Netlogon" and "Computer Browser" services, too. (On a domain controller computer, stopping the "Netlogon" service can potentially cause problems with client computers being able to allow logons with domain acconts.)

If this is something you want to do long-term, you might be better off to rename the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanManServer\Shares registry key to something else, create a new "Shares" key with a "Security" subkey, then briefly stop and restart the "Server" service (and dependent services). This will effectively disable all "shares" on the box.

When you're ready to bring the shares back, delete the temporary "Shares" key, rename the old one back to "Shares", and bounce the service again.


You can definitely do this on a temporary basis and it'll be fine. Microsoft has been known to assume that this service is "always on" (have a look at for an example of weird behaviour in one part of the product based on that assumption).

The "right way" to handle not exporting shares via SMB is probably one of the following (based on your tolerance for risk and desired to deal with potential "strangeness"):

  • Don't share anything, but leave service running.
  • Firewall the machine to prevent access to ports 139 and 445, but leave service running.
  • Unbind "File and Print Sharing for Microsoft Networks" from the box's NIC.
  • Just stop the service and hope for the best.
share|improve this answer
The server is a domain client, and only acts as a file server. So shutting off "Server" should be fine? – churnd Jul 13 '09 at 12:08
I'm dropping on an edit now. – Evan Anderson Jul 13 '09 at 12:15
Now that you mentioned stopping the service, I vaguely remember doing that before. Your "hope for the best" comment is enough to deter me from doing it again. I will probably from now on Unbind File and Print Sharing from the NIC to temporarily disable it. – churnd Jul 13 '09 at 14:19

Evan mentioned "Unbind File and Print Sharing for Microsoft Networks from the box's NIC". This is the method I would choose. In fact on servers with extra NICs (e.g. Hyper-V servers) I routinely unbind the server and workstation services to stop that NIC being used for file/print stuff.

In the Network Connections click the Advanced menu then Advanced Settings. Choose the network interface and untick File and Printer sharing. Tick it again to turn the fps back on.


share|improve this answer

every share has a separate set of permissions on the share itself. open up compmgmt.msc and then look for "shares" under "shared folders", right-click on the share, choose "properties", then uncheck everything in the "share permissions" tab, effectively taking away everyone's ability to see any files in their mapped drive.

then restart the server to make sure no files are locked by users, then you can begin copying files over

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.