Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows Server 系統教學 >> Server 2003

Windows 2000/2003 刪除預設共享(C$、D$、ADMIN$、IPC$)三種方法:批次檔、啟動資料夾、登錄檔永久停用

編輯:Server 2003

方法一:批次檔每次開機刪除(臨時)

@echo off
net share c$ /delete
net share d$ /delete
net share e$ /delete
net share ipc$ /delete
net share admin$ /delete

存為 del_shares.bat,捷徑放入「啟動」資料夾或排程器執行。

方法二:登錄檔永久停用(推薦)

停用磁碟機預設共享 (C$、D$、E$...)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
"AutoShareServer"=dword:00000000

停用 ADMIN$ 共享

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
"AutoShareWks"=dword:00000000

停用 IPC$ 共享(限制匿名連線)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"restrictanonymous"=dword:00000001

將上述內容分別存為 .reg 檔匯入,或合併為單一檔案匯入,**重開機生效**。

說明

  • AutoShareServer 控制伺服器版本(2000/2003 Server)磁碟機預設共享。
  • AutoShareWks 控制工作站版本(XP/2000 Pro)的 ADMIN$ 共享。
  • restrictanonymous=1 限制匿名使用者列舉共享/帳號資訊,間接阻擋 IPC$ 匿名連線。
  • 若需臨時恢復共享,將值改為 1 或刪除該值並重開機。
Copyright © Windows教程網 All Rights Reserved