Skip to main content
Minor correction
Source Link
Jimadine
  • 1.4k
  • 1
  • 11
  • 15

Command line method

Assuming the current user is a member of the Administrators group, open a command prompt and enter:

reg add HKLM\System\CurrentControlSet\Services\NetBT\Parameters /V SmbDeviceEnabled /T REG_DWORD /F /D 0

(this adds the required registry setting to disable SMB, and is the CLI equivalent of the OP's answer)

Then enter:

sc stop lanmanserver
sc config lanmanserver start= disabled

(this stops and disables the server service, a.k.a lanmanserver)

Restart your computer:

shutdown -r -t 01

After the restart, open a command prompt and enter the following command to verify that the serviceSMB is no longer listening on port 445:

netstat -na | find "LISTENING" | find ":445 "

If no output is returned by this command, you're all good!

Another possible method involving the GUI

...is to uninstall File and Printer Sharing for Microsoft Networks completely:

  1. Go to Start | Control Panel, and double-click the Network Connections applet.
  2. Right-click Local Area Connection (i.e., the Internet-facing connection), and select Properties.
  3. Select File And Printer Sharing For Microsoft Networks, and click the Uninstall button.
  4. Choose Yes when prompted to uninstall the component. Close all dialog boxes and applets.

For those that might benefit from a guide with screenshots, see:
http://ca.huji.ac.il/services/security/sharingXP-uninstall.shtml

Command line method

Assuming the current user is a member of the Administrators group, open a command prompt and enter:

reg add HKLM\System\CurrentControlSet\Services\NetBT\Parameters /V SmbDeviceEnabled /T REG_DWORD /F /D 0

(this adds the required registry setting to disable SMB, and is the CLI equivalent of the OP's answer)

Then enter:

sc stop lanmanserver
sc config lanmanserver start= disabled

(this stops and disables the server service, a.k.a lanmanserver)

Restart your computer:

shutdown -r -t 01

After the restart, open a command prompt and enter the following command to verify that the service is no longer listening on port 445:

netstat -na | find "LISTENING" | find ":445 "

If no output is returned by this command, you're all good!

Another possible method involving the GUI

...is to uninstall File and Printer Sharing for Microsoft Networks completely:

  1. Go to Start | Control Panel, and double-click the Network Connections applet.
  2. Right-click Local Area Connection (i.e., the Internet-facing connection), and select Properties.
  3. Select File And Printer Sharing For Microsoft Networks, and click the Uninstall button.
  4. Choose Yes when prompted to uninstall the component. Close all dialog boxes and applets.

For those that might benefit from a guide with screenshots, see:
http://ca.huji.ac.il/services/security/sharingXP-uninstall.shtml

Command line method

Assuming the current user is a member of the Administrators group, open a command prompt and enter:

reg add HKLM\System\CurrentControlSet\Services\NetBT\Parameters /V SmbDeviceEnabled /T REG_DWORD /F /D 0

(this adds the required registry setting to disable SMB, and is the CLI equivalent of the OP's answer)

Then enter:

sc stop lanmanserver
sc config lanmanserver start= disabled

(this stops and disables the server service, a.k.a lanmanserver)

Restart your computer:

shutdown -r -t 01

After the restart, open a command prompt and enter the following command to verify that SMB is no longer listening on port 445:

netstat -na | find "LISTENING" | find ":445 "

If no output is returned by this command, you're all good!

Another possible method involving the GUI

...is to uninstall File and Printer Sharing for Microsoft Networks completely:

  1. Go to Start | Control Panel, and double-click the Network Connections applet.
  2. Right-click Local Area Connection (i.e., the Internet-facing connection), and select Properties.
  3. Select File And Printer Sharing For Microsoft Networks, and click the Uninstall button.
  4. Choose Yes when prompted to uninstall the component. Close all dialog boxes and applets.

For those that might benefit from a guide with screenshots, see:
http://ca.huji.ac.il/services/security/sharingXP-uninstall.shtml

Minor corrections
Source Link
Jimadine
  • 1.4k
  • 1
  • 11
  • 15

Two possible commandCommand line methodsmethod

Assuming the current user is a member of the Administrators group, open a command prompt and enter:

reg add HKLM\System\CurrentControlSet\Services\NetBT\Parameters /V SmbDeviceEnabled /T REG_DWORD /F /D 0

(this adds the required registry setting to disable SMB, and is the CLI equivalent of the OP's answer)

or Then enter:

sc stop serverlanmanserver
sc config serverlanmanserver start= disabled

(this stops and disables the server service, a.k.a lanmanserver)

The following will confirm whether it has done the job:

netstat -na | find "LISTENING" | find ":445"

If no output is returned by this command, you're all good!
If output is returned then you may need to restartRestart your computer:

shutdown -r -t 01

After the restart, open a command prompt and enter the netstatfollowing command again to verify that the service is no longer listening. on port 445:

netstat -na | find "LISTENING" | find ":445 "

If no output is returned by this command, you're all good!

Another possible method involving the GUI

...is to uninstall File and Printer Sharing for Microsoft Networks completely:

  1. Go to Start | Control Panel, and double-click the Network Connections applet.
  2. Right-click Local Area Connection (i.e., the Internet-facing connection), and select Properties.
  3. Select File And Printer Sharing For Microsoft Networks, and click the Uninstall button.
  4. Choose Yes when prompted to uninstall the component. Close all dialog boxes and applets.

For those that might benefit from a guide with screenshots, see:
http://ca.huji.ac.il/services/security/sharingXP-uninstall.shtml

Two possible command line methods

Assuming the current user is a member of the Administrators group, open a command prompt and enter:

reg add HKLM\System\CurrentControlSet\Services\NetBT\Parameters /V SmbDeviceEnabled /T REG_DWORD /F /D 0

(this adds the required registry setting to disable SMB, and is the CLI equivalent of the OP's answer)

or

sc stop server
sc config server start= disabled

(this stops and disables the server service)

The following will confirm whether it has done the job:

netstat -na | find "LISTENING" | find ":445"

If no output is returned by this command, you're all good!
If output is returned then you may need to restart your computer:

shutdown -r -t 01

After the restart, open a command prompt and enter the netstat command again to verify that the service is no longer listening.

Another possible method involving the GUI

...is to uninstall File and Printer Sharing for Microsoft Networks completely:

  1. Go to Start | Control Panel, and double-click the Network Connections applet.
  2. Right-click Local Area Connection (i.e., the Internet-facing connection), and select Properties.
  3. Select File And Printer Sharing For Microsoft Networks, and click the Uninstall button.
  4. Choose Yes when prompted to uninstall the component. Close all dialog boxes and applets.

For those that might benefit from a guide with screenshots, see:
http://ca.huji.ac.il/services/security/sharingXP-uninstall.shtml

Command line method

Assuming the current user is a member of the Administrators group, open a command prompt and enter:

reg add HKLM\System\CurrentControlSet\Services\NetBT\Parameters /V SmbDeviceEnabled /T REG_DWORD /F /D 0

(this adds the required registry setting to disable SMB, and is the CLI equivalent of the OP's answer)

Then enter:

sc stop lanmanserver
sc config lanmanserver start= disabled

(this stops and disables the server service, a.k.a lanmanserver)

Restart your computer:

shutdown -r -t 01

After the restart, open a command prompt and enter the following command to verify that the service is no longer listening on port 445:

netstat -na | find "LISTENING" | find ":445 "

If no output is returned by this command, you're all good!

Another possible method involving the GUI

...is to uninstall File and Printer Sharing for Microsoft Networks completely:

  1. Go to Start | Control Panel, and double-click the Network Connections applet.
  2. Right-click Local Area Connection (i.e., the Internet-facing connection), and select Properties.
  3. Select File And Printer Sharing For Microsoft Networks, and click the Uninstall button.
  4. Choose Yes when prompted to uninstall the component. Close all dialog boxes and applets.

For those that might benefit from a guide with screenshots, see:
http://ca.huji.ac.il/services/security/sharingXP-uninstall.shtml

Improved GUI method instructions
Source Link
Jimadine
  • 1.4k
  • 1
  • 11
  • 15

Two possible command line methods

Assuming the current user is a member of the Administrators group, open a command prompt and enter:

reg add HKLM\System\CurrentControlSet\Services\NetBT\Parameters /V SmbDeviceEnabled /T REG_DWORD /F /D 0

(this adds the required registry setting to disable SMB, and is the CLI equivalent of the OP's answer)

or

sc stop server
sc config server start= disabled

(this stops and disables the server service)

The following will confirm whether it has done the job:

netstat -na | find "LISTENING" | find ":445"

If no output is returned by this command, you're all good!
If output is returned then you may need to restart your computer:

shutdown -r -t 01

After the restart, open a command prompt and enter the netstat command again to verify that the service is no longer listening.

Another possible method involving the GUI

...is to uninstall File and Printer Sharing for Microsoft Networks completely. Here's:

  1. Go to Start | Control Panel, and double-click the Network Connections applet.
  2. Right-click Local Area Connection (i.e., the Internet-facing connection), and select Properties.
  3. Select File And Printer Sharing For Microsoft Networks, and click the Uninstall button.
  4. Choose Yes when prompted to uninstall the component. Close all dialog boxes and applets.

For those that might benefit from a helpful guide with screenshots, see: 
http://ca.huji.ac.il/services/security/sharingXP-uninstall.shtml

Two possible command line methods

Assuming the current user is a member of the Administrators group, open a command prompt and enter:

reg add HKLM\System\CurrentControlSet\Services\NetBT\Parameters /V SmbDeviceEnabled /T REG_DWORD /F /D 0

(this adds the required registry setting to disable SMB, and is the CLI equivalent of the OP's answer)

or

sc stop server
sc config server start= disabled

(this stops and disables the server service)

The following will confirm whether it has done the job:

netstat -na | find "LISTENING" | find ":445"

If no output is returned by this command, you're all good!
If output is returned then you may need to restart your computer:

shutdown -r -t 01

After the restart, open a command prompt and enter the netstat command again to verify that the service is no longer listening.

Another possible method involving the GUI

...is to uninstall File and Printer Sharing for Microsoft Networks completely. Here's a helpful guide with screenshots: http://ca.huji.ac.il/services/security/sharingXP-uninstall.shtml

Two possible command line methods

Assuming the current user is a member of the Administrators group, open a command prompt and enter:

reg add HKLM\System\CurrentControlSet\Services\NetBT\Parameters /V SmbDeviceEnabled /T REG_DWORD /F /D 0

(this adds the required registry setting to disable SMB, and is the CLI equivalent of the OP's answer)

or

sc stop server
sc config server start= disabled

(this stops and disables the server service)

The following will confirm whether it has done the job:

netstat -na | find "LISTENING" | find ":445"

If no output is returned by this command, you're all good!
If output is returned then you may need to restart your computer:

shutdown -r -t 01

After the restart, open a command prompt and enter the netstat command again to verify that the service is no longer listening.

Another possible method involving the GUI

...is to uninstall File and Printer Sharing for Microsoft Networks completely:

  1. Go to Start | Control Panel, and double-click the Network Connections applet.
  2. Right-click Local Area Connection (i.e., the Internet-facing connection), and select Properties.
  3. Select File And Printer Sharing For Microsoft Networks, and click the Uninstall button.
  4. Choose Yes when prompted to uninstall the component. Close all dialog boxes and applets.

For those that might benefit from a guide with screenshots, see: 
http://ca.huji.ac.il/services/security/sharingXP-uninstall.shtml

Tiny correction to sc command line
Source Link
Jimadine
  • 1.4k
  • 1
  • 11
  • 15
Loading
Source Link
Jimadine
  • 1.4k
  • 1
  • 11
  • 15
Loading