• CA到期後,如何延長期限?

    1.CA server 本身的 生命期限

    How to renew the CA certificate:

    Go to the Certificate Authority and highlight the server name.

    Right click and go to All Tasks. At the bottom is the option to renew CA certificate.

    This will ask you to stop the Certificate Services. Select yes. It brings up a dialog box with the option to generate a new public and private key. Select yes. 

    It will now start the Certificate Services and your CA certificate will be renewed. Go to start, run and type in mmc.

    Go to the conosole and highlight Add/Remove Snap-in.

    Click on the add button.  Then choose the Certificates snap-in. 

    Add the snap-in for the Computer Account, hit the next button and select for the local computer and hit finish.

    You should now have the console open for the certificates for the local computer.

    因CA Server 預設有此網頁伺服器的憑證 . 預設是兩年.故如果要依照指定年限,以下有三個必要條件要成立
    1.憑證rootca 有效期.離到期日還有多久時間
    2.
    憑證範本中的年限
    3.CA
    需要修改機碼指定最大年限
    依照以上三項,選擇最小者才可以使其憑證正確發佈及運作
    1. 檢視 RootCa 憑證期限
    開啟Certificate Authority (CA) 在 RootCA 上,按右鍵,內容.請您檢視 [一般]頁面 您亦可以看到 CA憑證" 憑證#0" 請點選[檢視憑證] 您亦可以看到目前憑證資訊 其中包含發佈及到期日
    如何檢是目前 CA 視為獨立CA 還是企業 CA?
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\{Your CA name}\CAType
    CAType = 0 (This means it is installed as Enterprise Root CA)
    CAType = 1 (This means it is installed as Enterprise Subordinate CA)
    CAType = 3 (This means it is installed as Stand Alone CA)
    CAType = 4 (This means it is installed as Stand Alone Subordinate CA)
    2. 新增新範本,並指定年限

    如何建立新憑證?

    請開啟MMC 新增[憑證範本],並憑證範本.右邊視窗您可以看到所有內建範本.請在此新增您要的憑證類型範本,在此以 [程式碼簽署] 為例 您可以按右鍵[複製範本]

    clip_image001

    針對此範本給予一個顯示名稱.您亦可以再此定義有效期限及相關設定

    clip_image002

    您需要針對此憑證給於安全性設定, 例如: 此憑證是要發行給Domain Users 使用的.請您給予 [讀取]及[註冊] 權限

    clip_image003

    設定完成後您亦可以在[憑證範本]上看到此憑證已經建立完成

    clip_image004

    如何發佈新憑證?

    請您使用MMC 開啟[憑證授權單位] ,在您的CA Server 下可以看到[憑證範本] .請您按右鍵.選擇[新增]\[要發行的憑證範本]

    clip_image005

    3. 設定CA Server 機碼, 參考KB 254632 http://support.microsoft.com/kb/254632/en-us
    To change the validity period settings for a CA, follow these steps.

    1. Click Start, and then click Run.

    2. In the Open box, type regedit, and then click OK.

    3. Locate, and then click the following registry key:

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\CertSvc\Configuration\<CAName>

    4. In the right pane, double-click ValidityPeriod.

    5. In the Value data box, type one of the following, and then click OK:

    o Days

    o Weeks

    o Months

    o Years

    .

    6. In the right pane, double-click ValidityPeriodUnits.

    7. In the Value data box, type the numeric value that you want, and then click OK. For example, type 2.

    8. Stop, and then restart the Certificate Services service. To do so:

    a. Click Start, and then click Run.

    b. In the Open box, type cmd, and then click OK.

    c. At the command prompt, type the following lines. Press ENTER after each line.

    net stop certsvc
    net start certsvc

    d. Type exit to quit Command Prompt.

  • DFS無法複製特定檔案

    問題:在特定DFS Server上無法複製

    收集 fsutil USN readdata <Filelocation> > result.txt

    Findings
    ======

    Major Version    : 0x2
    Minor Version    : 0x0
    FileRef#         : 0x000c00000001425a
    Parent FileRef#  : 0x00a8000000006575
    Usn              : 0x0000000146be00a0
    Time Stamp       : 0x0000000000000000 12:00:00 AM 1/1/1601
    Reason           : 0x0
    Source Info      : 0x0
    Security Id      : 0x1675
    File Attributes  : 0x120
    File Name Length : 0x62
    File Name Offset : 0x3c

    Regarding MSDN: http://msdn.microsoft.com/en-us/library/aa365535(VS.85).aspx
    The Flag of FILE_ATTRIBUTE_TEMPORARY is set, By design, DFSR does not replicate files if they have the temporary attribute set on them, and it cannot be configured to do so.
    The reason DFSR does not replicate files with the temporary attribute set is that they are considered short-lived files that you would never actually want to replicate. Using the temporary attribute on a file keeps that file in memory and saves on disk I/O. Therefore applications can use it on short-lived files to improve performance.

    An application can use FILE_ATTRIBUTE_TEMPORARY when calling the CreateFile function if they want a temporary file.

    Solution
    ======
    Create a new doc file then copy the content to the new file

    Reference
    ========
    DFSR Does Not Replicate Temporary Files
    http://blogs.technet.com/askds/archive/2008/11/11/dfsr-does-not-replicate-temporary-files.aspx

  • Windows Server 2003 – How to backup GPO and restore to Default

    [問題說明]: 我要怎麼備份現有的GPO, 然後還原 Default Domain Policy 以及 Default Domain Controller Policy 到預設值.

    [操作步驟]:

    [備份現有的GPO設定]

    1. 使用GPMC來備份現有的GPO
    clip_image002

    2. 選擇備份的位置後按下備份
    clip_image004

    3. 備份完成後按下確定
    clip_image006

    [還原GPO到Default Settings]

    1. 先下載 2003 Resource Kits Tools 並安裝在DC

    http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en

    2. 打開命令提示字元後輸入以下指令,並回答兩個 Yes還原

    # dcgpofix /ignoreschema
    clip_image008

    3. 還原後請打開GPMC檢查, 原則上不會動到原本link到OU的GPO,只會還原 Default Domain Policy 和 Default Domain Controller Policy

    clip_image010

  • Windows Vista/7 – "The User Profile Service failed the logon. User profile cannot be loaded"

    [問題描述]︰Vista/7 - "The User Profile Service failed the logon. User profile cannot be loaded"

    [問題說明]︰使用者設定檔服務無法登入。 無法載入使用者設定檔

    [解決方法]:

    1. 使用另一個本機管理者的帳號來登入試著刪除機碼 (如果有的話)

    2. 若沒其他管理者的帳號, 可使用 Vista的光碟片來進入 Win PE環境, 試著用系統還原到上次沒問題的狀況

    · 若之前您要做還原的話,必需先在BIOS裏設定光碟機開機為第一順位,之後放入光碟片開機後,就會出現以下的畫面,這個時後您點選空白鍵,即會進入光碟機開機。

    clip_image002

    · 在這個畫面中,請點選下方的「修復您的電腦」。
    clip_image004

    · 在這個畫面中,直接點選「下一步」即可。

    clip_image006

    · 點選系統還原

    clip_image008

    · 尋找最近一個還原點來回復系統後,重開機試著登入

    3. 若可以登入 domain的環境, 請試著用 domain admin的權限來登入電腦後再刪除機碼來解決問題

    4. 使用連線網路登錄的方式 (需要有另一台電腦在旁才可以操作)

    · 若您有該台電腦的管理者權限帳號和IP則可以透過連線網路登錄的方式將機碼刪除

    · 打開 regedit之後選連線網路登錄, 選擇要連接的電腦
    clip_image010

    · 找到要刪除的SID後再刪除 (建議可先行備份), 把有問題的帳號的機碼刪除 (以下用我的帳號 pennka例)

    clip_image012           

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    5. 將此台電腦的HD接到可開機的電腦 (載入登錄區的方式)

    · 以另一個系統開機,執行regedit。

    · 點選到 HKEY_LOCAL_MACHINE。

    · 點選上方的「檔案」>「載入登錄區」。
    clip_image014

    · 將路徑瀏覽到有問題系統裏的Windows\system32\config目錄,然後點選Software檔案。在出現以下的畫面時,給予一個臨時的名稱,例如123,再按下確定。
    clip_image016

    · 此時,您會看到在HKEY_LOCAL_MACHINE下會有一個機碼名稱為123,此123 的機碼即是原來有問題系統的HKEY_LOCAL_MACHINE\Software機碼。
    clip_image018

    · 找到要刪除的SID後再刪除 (建議可先行備份), 把有問題的帳號的機碼刪除 (以下用我的帳號 pennka為例)

    clip_image020           

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    · 點選 HKEY_LOCAL_MACHINE\123,再點選上方的「檔案」>「Hive解除載入」。
    clip_image022

    · 關機,將HD還原至原來的機器,再重新開機。

  • Windows Update的圖示出現後馬上消失

    [問題描述]: 我的Windows Update 圖示在右下角的工作列出現後,不一會就不見了,更新好像也沒安裝,請問如何處理

    [問題說明]: 從MPSReport中檢查以下的log file

    # Bistadmin  (client端有cache直接找舊的WSUS Server要求更新,當然也就找不到可以下載的點)

    GUID: {C42E6844-C109-4BAC-BC4B-6E15D539C4D0} DISPLAY: WU Client Download
    TYPE: DOWNLOAD STATE: SUSPENDED OWNER: NT AUTHORITY\SYSTEM
    PRIORITY: HIGH FILES: 0 / 1 BYTES: 0 / UNKNOWN
    CREATION TIME: 2009/12/23 下午 02:07:00 MODIFICATION TIME: 2010/1/12 下午 02:16:46
    COMPLETION TIME: UNKNOWN ACL FLAGS:
    NOTIFY INTERFACE: REGISTERED NOTIFICATION FLAGS: 11
    RETRY DELAY: 1200 NO PROGRESS TIMEOUT: 1209600 ERROR COUNT: 1018
    PROXY USAGE: NO_PROXY PROXY LIST: NULL PROXY BYPASS LIST: NULL
    DESCRIPTION:
    JOB FILES:  0 / UNKNOWN WORKING
    http://old wsus hostname/Content/E8/6BB686381E32B6777FD868FD024A8C989A9211E8.exe -> C:\WINDOWS\SoftwareDistribution\Download\6348d47077295f9f0fddb91f0a5a6854\WindowsXP-KB961503-x86-CHT.exe
    ERROR CODE:    0x80072ee7 - The server name or address could not be resolved
    ERROR CONTEXT: 0x00000005 - 處理遠端檔案時發生錯誤。

    # QFECheck (檢查QFECheck檔案時發現此更新已經安裝在此台XP中)

    found some KB already installed at this system
    KB961503:  Current on system.
    KB961501:  Current on system.
    KB973815:  Current on system.
    KB973507:  Current on system.
    KB956744:  Current on system.
    KB971557:  Current on system.

    # Windowsupdate.log (從Windowsupdate.log 也有看到某些更新已經是重複的)

    WARNING: Failed to add file to the FileLocationList with 0x80240013
    -  0x80240013 WU_E_DUPLICATE_ITEM Operation tried to add a duplicate item to a list.

    # System Event (系統的事件中有新的更新已經成功安裝,原則上是Cache造成BITS一直在跟舊的WSUS要求更新)

    image

    [解決方法]:

    1. 安裝 Windows XP Support Tools
    http://www.microsoft.com/downloads/details.aspx?displaylang=zh-tw&FamilyID=49ae8576-9bb9-4126-9761-ba8011fabf38

    2. 執行bitsadmin指令清除BITS的queue
    - bitsadmin /list (檢查目前BITS有多少要執行的Jobs)
    - bitsadmin /reset /allusers (清除所有BITS目前的Jobs)

    3. 停止 Automatic Updates / Background Intelligent Transfer Service / Cryptographic Services
    - net stop wuauserv
    - net stop bits
    - net stop cryptsvc

    4. 將C:\Windows\SoftwareDistribution和C:\Windows\system32\catroot2更名或刪除。

    5. 將剛才停止的服務重新啟動
    - net start cryptsvc
    - net start bits
    - net start wuauserv

    6. 執行 wuauclt /detectnow 更WSUS做同步