บทความนี้อธิบายวิธีการใช้'นโยบายกลุ่ม'เพื่อกำหนดค่าการรักษาความปลอดภัยในการตรวจสอบการตั้งค่าสำหรับใช้งาน Windows Vista หรือ Windows Server 2008 บนคอมพิวเตอร์ ในโดเมน Windows Server 2003 หรือ ในโดเมน Windows 2000 windows Vista และ Windows Server 2008 ช่วยให้คุณจัดการนโยบายการตรวจสอบระดับรายละเอียดเพิ่มเติม โดยใช้ประเภทย่อยนโยบายการตรวจสอบ บทความนี้อธิบายวิธีการที่ผู้ดูแลระบบสามารถใช้เพื่อปรับใช้นโยบายการตรวจสอบแบบกำหนดเองที่ใช้การรักษาความปลอดภัยที่รายละเอียดในการตรวจสอบการตั้งค่าสำหรับคอมพิวเตอร์ที่ใช้ Windows Vista หรือ Windows Server 2008
บทความนี้อธิบายถึงวิธีการใช้'นโยบายกลุ่ม'เพื่อกำหนดค่าการรักษาความปลอดภัยรายละเอียดการตั้งค่าที่ตรวจสอบสำหรับคอมพิวเตอร์ที่ใช้ Windows Vista หรือ Windows Server 2008 ในโดเมน Windows Server 2003 หรือ ในโดเมน Windows 2000 ใน Windows Vista และ Windows Server 2008 คุณสามารถเพิ่มเติมควบคุมประเภทย่อยของนโยบายการตรวจสอบแต่ละเกินกว่าที่คุณมีระบบปฏิบัติการ Windows รุ่นก่อนหน้า บุคคลเป็นการตรวจสอบนโยบายประเภทย่อยที่พร้อมใช้งานใน Windows Vista จะไม่มีการเปิดเผยในอินเทอร์เฟซของเครื่องมือ'นโยบายกลุ่ม' ผู้ดูแลระบบสามารถใช้ขั้นตอนที่อธิบายไว้ในบทความนี้เพื่อปรับใช้นโยบายการตรวจสอบแบบกำหนดเองที่ใช้การรักษาความปลอดภัยที่รายละเอียดในการตรวจสอบการตั้งค่าการใช้งาน Windows Vista และ Windows Server 2008 บนคอมพิวเตอร์ ในโดเมน Windows Server 2003 หรือ ในโดเมน Windows 2000
สิ่งที่ควรพิจารณา
ต่อไปนี้คือ บางสิ่งที่ควรพิจารณาก่อนที่คุณทำตามขั้นตอนที่กล่าวถึงในบทความนี้:
- วิธีการใช้โค้ดตัวอย่าง ตัวอย่างรหัสใช้ Netlogon ใช้ร่วมกัน นอกจากนี้ ตัวอย่างรหัสใช้โฟลเดอร์ %SystemRoot%\Temp เป็นแคช
- กระบวนงานใช้โดเมนตัวอย่างของ Contoso.com
- กระบวนการนี้สันนิษฐานว่า เงื่อนไขต่อไปนี้เป็นจริง:
- คุณไม่คุ้นเคยกับเทคโนโลยีและเครื่องมือต่อไปนี้:
- Group Policy startup scripts
- Group Policy Management Console
- The Auditpol.exe command-line tool
- You have a basic understanding of batch file processing.
- You are familiar with the scripts that the procedure uses work to override legacy domain-based audit policy settings with the detailed audit policy settings that are available in Windows Vista. If you do not want to configure the detailed audit policy settings that are available in Windows Vista, do not use the procedure that this article discusses.
- A legacy policy overwrites the auditpol settings only if the auditpol settings are defined explicitly in the legacy policy. ลักษณะการทำงานนี้เกิดจากการออกแบบ Additionally, if the auditpol settings are specified as No auditing or as not defined, the auditpol settings have precedence and are not overwritten by the legacy policy.
Use Group Policy to configure detailed security auditing settings for computers
To use Group Policy to configure detailed security auditing settings for Windows Vista-based or Windows Server 2008-based computers in a Windows Server 2003 domain or in a Windows 2000 domain, follow these steps.
Step 1: Determine the security auditing settings that you want to deploy to Windows Vista-based or Windows Server 2008-based computers
- Log on to a computer as a user who has administrator credentials.
- คลิกเริ่มการทำงานชี้ไปที่โปรแกรมทั้งหมดคลิกเสริมคลิกขวาพร้อมรับคำสั่งแล้ว คลิกเรียกใช้ในฐานะผู้ดูแล.
- ในการการควบคุมบัญชีผู้ใช้กล่องโต้ตอบ คลิกดำเนินการต่อ.
- Flush the default audit policy settings. To do this, type the following line at the command prompt, and then press ENTER:
auditpol /clear
- Use the Auditpol.exe command-line tool to configure the custom audit policy settings that you want.
For example, type the following lines at the command prompt. Press ENTER after each line.auditpol /set /subcategory:"user account management" /success:enable /failure:enable
auditpol /set /subcategory:"logon" /success:enable /failure:enable
auditpol /set /subcategory:"IPSEC Main Mode" /failure:enable
หมายเหตุ:To see all possible categories and subcategories, type the following line at the command prompt, and then press ENTER:auditpol /list /subcategory:*
- Type the following line at the command prompt, and then press ENTER:
auditpol /backup /file:auditpolicy.txt
- Copy the Auditpolicy.txt file to the Netlogon share of the domain controller that holds the primary domain controller (PDC) emulator role in the domain.
The Auditpolicy.txt file contains all the audit policy settings that you configured. The startup script uses this file to reapply the policy. After you successfully apply the startup script one time, you do not have to restart the computer to update audit policy settings. To update audit policy settings, overwrite the earlier version of the Auditpolicy.txt file that you copied to the Netlogon share. To do this, create a new Auditpolicy.txt file, and then copy the new Auditpolicy.txt file to the Netlogon share.
Step 2: Create the scripts, and then add the scripts to the Netlogon share
Microsoft แสดงตัวอย่างการเขียนโปรแกรมเพื่อประกอบการอธิบายเท่านั้น และไม่มีการรับประกัน ไม่ว่าโดยชัดแจ้งหรือโดยนัย ทั้งนี้รวมถึง แต่ไม่จำกัดเพียงการรับประกันโดยนัยในเรื่องการซื้อขายหรือความเหมาะสมสำหรับวัตถุประสงค์เฉพาะ บทความนี้อนุมานว่าคุณมีความคุ้นเคยกับภาษาการเขียนโปรแกรมที่แสดงอยู่ รวมทั้งเครื่องมือต่างๆ ที่ใช้ในการสร้างและแก้จุดบกพร่องกระบวนการ วิศวกรฝ่ายสนับสนุนของ Microsoft สามารถช่วยอธิบายเกี่ยวกับหน้าที่การใช้งานของกระบวนการเฉพาะได้ แต่จะไม่ปรับเปลี่ยนตัวอย่างเหล่านี้เพื่อให้มีหน้าที่การใช้งานที่เพิ่มขึ้น หรือสร้างกระบวนการใดๆ เพื่อตอบสนองความต้องการอย่างใดอย่างหนึ่งของคุณโดยเฉพาะ
- Create the AuditPolicy.cmd script. โดยให้ทำตามขั้นตอนต่อไปนี้::
- เริ่มใช้งาน Notepad แล้วจึงเปิดเอกสารว่าง
- Paste the following code to the document in Notepad:
@echo off
REM AuditPolicy.cmd
REM (c) 2006 Microsoft Corporation. All rights reserved.
REM Sample Audit Script to deploy Windows Vista
REM Granular Audit Policy settings.
REM Should be run as a startup script from Group Policy
REM ###################################################
REM Declare Variables so that we only need to edit file
REM names/paths in one location in script
REM ###################################################
set AuditPolicyLog=%systemroot%\temp\auditpolicy.log
set OSVersionSwap=%systemroot%\temp\osversionwap.txt
set OsVersionTxt=%systemroot%\temp\osversion.txt
set MachineDomainTxt=%systemroot%\temp\machinedomain.txt
set MachineDomainSwap=%systemroot%\temp\machinedomainSwap.txt
set ApplyAuditPolicyCMD=applyauditpolicy.cmd
set AuditPolicyTxt=auditpolicy.txt
REM ###################################################
REM Clear Log & start fresh
REM ###################################################
if exist %AuditPolicyLog% del %AuditPolicyLog% /q /f
date /t > %AuditPolicyLog% & time /t >> %AuditPolicyLog%
echo.
REM ###################################################
REM Check OS Version
REM ###################################################
ver | findstr "[" > %OSVersionSwap%
for /f "tokens=2 delims=[" %%i in (%OSVersionSwap%) do echo %%i > %OsVersionTxt%
for /f "tokens=2 delims=] " %%i in (%OsVersionTxt%) do set osversion=%%i
echo OS Version=%osversion% >> %AuditPolicyLog%
REM ###################################################
REM Skip Pre-Vista
REM ###################################################
if "%osversion%" LSS "6.0" exit /b 1
REM ###################################################
REM Get Domain Name
REM ###################################################
WMIC /namespace:\\root\cimv2 path Win32_ComputerSystem get domain /format:list > %MachineDomainSwap%
find /i "Domain=" %MachineDomainSwap% > %MachineDomainTxt%
for /f "Tokens=2 Delims==" %%i in (%MachineDomainTxt%) do set machinedomain=%%i
echo Machine domain=%machinedomain% >> %AuditPolicyLog%
REM ###################################################
REM Copy Script & Policy to Local Directory or Terminate
REM ###################################################
xcopy \\%machinedomain%\netlogon\%ApplyAuditPolicyCMD% %systemroot%\temp\*.* /r /h /v /y
if %ERRORLEVEL% NEQ 0 (
echo Could not read \\%machinedomain%\netlogon\%ApplyAuditPolicyCMD% >> %AuditPolicyLog%
exit /b 1
) else (
echo Copied \\%machinedomain%\netlogon\%ApplyAuditPolicyCMD% to %systemroot%\temp >> %AuditPolicyLog%
)
xcopy \\%machinedomain%\netlogon\%AuditPolicyTxt% %systemroot%\temp\*.* /r /h /v /y
if %ERRORLEVEL% NEQ 0 (
echo Could not read \\%machinedomain%\netlogon\%AuditPolicyTxt% >> %AuditPolicyLog%
exit /b 1
) else (
echo Copied \\%machinedomain%\netlogon\%AuditPolicyTxt% to %systemroot%\temp >> %AuditPolicyLog%
)
REM ###################################################
REM Create Named Scheduled Task to Apply Policy
REM ###################################################
%systemroot%\system32\schtasks.exe /create /ru System /tn audit /sc hourly /mo 1 /f /rl highest /tr "%systemroot%\temp\%ApplyAuditPolicyCMD%"
if %ERRORLEVEL% NEQ 0 (
echo Failed to create scheduled task for Audit >> %AuditPolicyLog%
exit /b 1
) else (
echo Created scheduled task for Audit >> %AuditPolicyLog%
)
REM ###################################################
REM Start Named Scheduled Task to Apply Policy
REM ###################################################
%systemroot%\system32\schtasks.exe /run /tn audit
if %ERRORLEVEL% NEQ 0 (
Failed to execute scheduled task for Audit >> %AuditPolicyLog%
) else (
echo Executed scheduled task for Audit >> %AuditPolicyLog%
) - ในการแฟ้ม:เมนู คลิกบันทึก.
- ในการบันทึกเป็นชนิดกล่อง คลิกแฟ้มทั้งหมดประเภท:AuditPolicy.cmdในการชื่อแฟ้มกล่อง แล้วคลิกบันทึก.
- Create the ApplyAuditPolicy.cmd script. โดยให้ทำตามขั้นตอนต่อไปนี้::
- เริ่มใช้งาน Notepad แล้วจึงเปิดเอกสารว่าง
- Paste the following code to the document in Notepad:
@echo off
REM ApplyAuditPolicy.cmd
REM (c) 2006 Microsoft Corporation. All rights reserved.
REM Sample Audit Script to deploy Windows Vista
REM Granular Audit Policy settings.
REM ###################################################
REM Declare Variables so that we only need to edit file
REM names/paths in one location in script
REM ###################################################
set DeleteAudit=DeleteAudit.txt
set AuditPolicyLog=%systemroot%\temp\AuditPolicy.log
set ApplyAuditPolicyLog=%systemroot%\temp\ApplyAuditPolicy.log
set OSVersionSwap=%systemroot%\temp\osversionwap.txt
set OsVersionTxt=%systemroot%\temp\osversion.txt
set MachineDomainTxt=%systemroot%\temp\machinedomain.txt
set MachineDomainSwap=%systemroot%\temp\machinedomainSwap.txt
set ApplyAuditPolicyCMD=ApplyAuditpolicy.cmd
set AuditPolicyTxt=AuditPolicy.txt
REM ###################################################
REM Clear Log & start fresh
REM ###################################################
if exist %ApplyAuditPolicyLog% del %ApplyAuditPolicyLog% /q /f
date /t > %ApplyAuditPolicyLog% & time /t >> %ApplyAuditPolicyLog%
echo.
REM ###################################################
REM Check OS Version
REM ###################################################
ver | findstr "[" > %OSVersionSwap%
for /f "tokens=2 delims=[" %%i in (%OSVersionSwap%) do echo %%i > %OsVersionTxt%
for /f "tokens=2 delims=] " %%i in (%OsVersionTxt%) do set osversion=%%i
echo OS Version=%osversion% >> %ApplyAuditPolicyLog%
REM ###################################################
REM Skip Pre-Vista
REM ###################################################
if "%osversion%" LSS "6.0" exit /b 1
REM ###################################################
REM Get Domain Name
REM ###################################################
WMIC /namespace:\\root\cimv2 path Win32_ComputerSystem get domain /format:list > %MachineDomainSwap%
find /i "Domain=" %MachineDomainSwap% > %MachineDomainTxt%
for /f "Tokens=2 Delims==" %%i in (%MachineDomainTxt%) do set machinedomain=%%i
echo Machine domain=%machinedomain% >> %ApplyAuditPolicyLog%
REM ###################################################
REM Delete Audit Task
REM Should only be used to remove the pseudo-policy from
REM client machines (designed for future Vista revisions
REM where this script will no longer be necessary, and this
REM script needs to be backed out).
REM to use, simply create a file in NETLOGON with a name
REM that matches the contents of DeleteAudit variable (above)
REM ###################################################
if exist \\%machinedomain%\netlogon\%DeleteAudit% (
%systemroot%\system32\schtasks.exe /delete /tn "Audit" /F
DEL %AuditPolicyLog%
DEL %ApplyAuditPolicyLog%
DEL %OSVersionSwap%
DEL %OsVersionTxt%
DEL %MachineDomainTxt%
DEL %MachineDomainSwap%
DEL %systemroot%\temp\%ApplyAuditPolicyCMD%
DEL %systemroot%\temp\%AuditPolicyTxt%
exit /b 1
)
REM ###################################################
REM Copy Audit Policy to Local Directory
REM This is tolerant of failures since the copy is just
REM a "cache refresh".
REM ###################################################
xcopy \\%machinedomain%\netlogon\%AuditPolicyTxt% %systemroot%\temp\*.* /r /h /v /y
if %ERRORLEVEL% NEQ 0 (
echo Could not read \\%machinedomain%\netlogon\%AuditPolicyTxt% so using previous cached copy>> %ApplyAuditPolicyLog%
) else (
echo Copied \\%machinedomain%\netlogon\%AuditPolicyTxt% to %systemroot%\temp >> %ApplyAuditPolicyLog%
)
REM ###################################################
REM Apply Policy
REM ###################################################
%systemroot%\system32\auditpol.exe /restore /file:%systemroot%\temp\%AuditPolicyTxt%
if %ERRORLEVEL% NEQ 0 (
Failed to apply audit settings >> %ApplyAuditPolicyLog%
) else (
echo Successfully applied audit settings >> %ApplyAuditPolicyLog%
) - ในการแฟ้ม:เมนู คลิกบันทึก.
- ในการบันทึกเป็นชนิดกล่อง คลิกแฟ้มทั้งหมดประเภท:ApplyAuditPolicy.cmdในการชื่อแฟ้มกล่อง แล้วคลิกบันทึก.
- Copy the AuditPolicy.cmd script and the ApplyAuditPolicy.cmd script to the Netlogon share of the domain controller that holds the PDC emulator role in the domain.
- Wait until Active Directory replication occurs. Also, wait until the files and folders in the system volume (SYSVOL) shared folder replicate on domain controllers in the domain.
- Add the startup script to the Default Domain Policy. โดยให้ทำตามขั้นตอนต่อไปนี้::
- เริ่มใช้เครื่องมือที่ผู้ใช้ของไดเรกทอรีที่ใช้งานอยู่และคอมพิวเตอร์
- คลิกขวาDomainNameแล้ว คลิกคุณสมบัติ.
- คลิกการนโยบายกลุ่มแท็บ คลิกนโยบายโดเมนเริ่มต้นแล้ว คลิกแก้ไข. The Group Policy Object Editor tool starts.
- ขยายการกำหนดค่าคอมพิวเตอร์ขยายการตั้งค่า windowsแล้ว คลิกสคริปต์ (/ ปิดเครื่องสำหรับการเริ่มต้น).
- คลิกสองครั้งเริ่มต้นแล้ว คลิกadd.
- ในการชื่อสคริปต์box, type the universal naming convention (UNC) path of the AuditPolicy.cmd file that is located in the Netlogon share. Use the following format:
\\FullyQualifiedDomainName\Netlogon\AuditPolicy.cmd
ตัวอย่างเช่น พิมพ์\\contoso.com\netlogon\auditpolicy.cmd. - คลิกตกลงสองครั้ง
Step 3: Verify that the security auditing settings are successfully applied
- Wait until Active Directory replication occurs. Also, wait until the files and folders in the system volume (SYSVOL) shared folder replicate on domain controllers in the domain.
- Restart a computer that is joined to the domain. Then, log on to the computer as a user who has administrator credentials.
- คลิกเริ่มการทำงานชี้ไปที่โปรแกรมทั้งหมดแล้ว คลิกเสริม.
- คลิกขวาพร้อมรับคำสั่งแล้ว คลิกเรียกใช้ในฐานะผู้ดูแล.
- ในการการควบคุมบัญชีผู้ใช้กล่องโต้ตอบ คลิกดำเนินการต่อ.
- พิมพ์บรรทัดต่อไปนี้ที่พร้อมท์รับคำสั่ง และกด enter:
auditpol /get /category: *
- ตรวจสอบว่า ตั้งค่าการตรวจสอบความปลอดภัยที่แสดงพรอมต์คำสั่งตรงกับการตั้งค่าที่กำหนดค่าไว้ในแฟ้ม AuditPolicy.txt ที่คุณสร้างไว้ใน "ขั้นตอนที่ 1: กำหนดความปลอดภัยให้กับการตรวจสอบการตั้งค่าที่คุณต้องการปรับใช้ Windows ที่ใช้ Vista หรือ Windows Server 2008 บนคอมพิวเตอร์ "
ถ้ามีการตั้งค่าการตรวจสอบความปลอดภัยไม่ตรงกับ ตรวจสอบแฟ้มบันทึกที่สร้างขึ้น โดยใช้สคริปต์การเริ่มต้นในโฟลเดอร์ %SystemRoot%\Temp ถ้าไม่มีแฟ้มบันทึกที่มีอยู่ในโฟลเดอร์ %SystemRoot%\Temp ตรวจสอบคอมพิวเตอร์เพื่อดูว่าเหตุใด'นโยบายกลุ่ม'ไม่ใช้
สำหรับข้อมูลเพิ่มเติมเกี่ยวกับวิธีการกำหนดค่าเริ่มต้นใช้งานสคริปต์ใน Active Directory แวะไปที่เว็บไซต์ต่อไปนี้ของ Microsoft:
สำหรับข้อมูลเพิ่มเติมเกี่ยวกับคอนโซลการจัดการนโยบายกลุ่ม แวะไปที่เว็บไซต์ต่อไปนี้ของ Microsoft:
For more information about the Auditpol.exe command-line tool and the Schtasks.exe command-line tool, see Windows Vista Help and Support.
หมายเลขบทความ (Article ID): 921469 - รีวิวครั้งสุดท้าย: 16 มกราคม 2554 - Revision: 4.0
ใช้กับ
- Windows Vista Ultimate
- Windows Vista Business
- Windows Vista Enterprise
- Windows Server 2008 Enterprise
- Windows Server 2008 Standard
- Windows Server 2008 Datacenter
| kbexpertiseinter kbhowto kbinfo kbmt KB921469 KbMtth |
แปลโดยคอมพิวเตอร์ข้อมูลสำคัญ: บทความนี้แปลโดยซอฟต์แวร์การแปลด้วยคอมพิวเตอร์ของ Microsoft แทนที่จะเป็นนักแปลที่เป็นบุคคล Microsoft มีบทความที่แปลโดยนักแปลและบทความที่แปลด้วยคอมพิวเตอร์ เพื่อให้คุณสามารถเข้าถึงบทความทั้งหมดในฐานความรู้ของเรา ในภาษาของคุณเอง อย่างไรก็ตาม บทความที่แปลด้วยคอมพิวเตอร์นั้นอาจมีข้อบกพร่อง โดยอาจมีข้อผิดพลาดในคำศัพท์ รูปแบบการใช้ภาษาและไวยากรณ์ เช่นเดียวกับกรณีที่ชาวต่างชาติพูดผิดเมื่อพูดภาษาของคุณ Microsoft ไม่มีส่วนรับผิดชอบต่อความคลาดเคลื่อน ความผิดพลาดหรือความเสียหายที่เกิดจากการแปลเนื้อหาผิดพลาด หรือการใช้บทแปลของลูกค้า และ Microsoft มีการปรับปรุงซอฟต์แวร์การแปลด้วยคอมพิวเตอร์อยู่เป็นประจำ
ต่อไปนี้เป็นฉบับภาษาอังกฤษของบทความนี้:
921469
(http://support.microsoft.com/kb/921469/en-us/
)