Jackson Chen
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • Create new note
      • Create a note from template
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Write
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Save as template
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Active Directory Domain Service Domain Controller (AD DS DC)概觀 * 設定儲存 AD DS 目錄資料庫(Ntds.dit,路徑:C:\\windows\system32\)與SYSVOL(路徑:C:\\windows\SYSVOL,該文件夾包含GPO範本設定與檔案)資料夾複本的伺服器。 * 除 RODC 以外的 DC 皆儲存一份可讀寫的 Ntds.dit 與 SYSVOL資料夾複本。 * 也掌管其他 AD DS 服務: * Kerberos 驗證服務。 * 使用者與電腦帳戶的登入認證及發出票證授權票證(ticket-granting ticket,TGT)給登入到 AD DS 網域的帳戶的金鑰發佈中心(Key Distribution Center,KDC)。 * 大多數企業部屬的最低需求是最少2個 DC,以確保高可用性與效能。 ## 通用類別目錄 Global Catalog * 是樹系中所有物件的一部分、唯讀及可搜尋的複本,可加快搜尋儲存在樹系中不同網域的 DC 的物件之速度,他擁有樹系中其他網域的部分屬性集。 * 支援整個樹系的物件查詢。 ## DC SRV 紀錄 * 用戶端透過 DNS查詢,藉由定位找到最近的 DC。 * DC 動態註冊他們的位址(IP)到 DNS。 * 當用戶端需要聯絡 DC 與 使用 站台(Sites)時,他會在 DNS 中搜尋[SRV紀錄](https://www.cloudflare.com/zh-tw/learning/dns/dns-records/dns-srv-record/)(為特定的服務,如 VoIP、即時訊息等指定主機和連接埠),DNS查詢回應的內容包括: * 與用戶端相同站台的 DC 清單。 * 若在同站台卻找不到,傳回下一個最接近的站台的 DC 清單。 * 若在一個最近的站台找不到可用的,則傳回在其他至台可用的 DC 的隨機清單。 ## AD DS 登入程序 * 當使用者嘗試登入到一台電腦,該電腦透過 DNS 搜尋(lookup),以尋找 DC 驗證使用者。然後電腦將使用者的名稱與密碼發送給 DC 進行認證,在 DC 的本機安全性授權(local security authority,LSA)負責實際驗證程序。 * 如果登入成功,LSA會替使用者建立一個包含使用者與使用者所屬的任何群組織安全性識別碼(security IDs)的存取權杖(access token),該權杖提供遊使用者啟動的任何程序之存取驗證。 * 登入程序: * 使用者帳戶跟 DC 進行驗證。 * DC 傳回一個TGT(使用者與電腦帳戶的登入認證及發出票證授權票證(ticket-granting ticket)申請存取工作站。 * 用戶端使用TGT申請存取工作站。 * DC 會授權工作站存取權。 * 用戶端使用TGT申請存取伺服器。 * DC 傳回存取伺服器。 ## 操作主機 opeartions masters * 操作主機(opeartions masters):某些操作只能由特定角色在特定 DC 上執行,掌管這些角色之一的 DC 稱為操作主機。 ### 操作主機角色(彈性單一主機操作 Flexible single master operations,FSMO) * 操作主機角色:是可以掌管這些特定的 DC 的操作主機的角色,又稱彈性單一主機操作角色(Flexible single master operations,FSMO),總共有5個操作主機。這5個角色可以放在單一 DC 或將他們分布在多個 DC 中。預設樹系中第一個安裝的 DC 會包含這5個角色,這些角色可以在建置多個 DC 後進行移動。操作主機角色有助於防止由複寫延遲(replication latency)造成 AD DS 中的衝突。 * 有五個 FSMO 角色,分為兩類:樹系操作主機(Forest operations masters)和網域操作主機(Domain operations masters)。 * 樹系操作主機(Forest operations masters): * 網域命名主機(Domain Naming Master):當您新增、更改網域名稱與刪除網域時,必要聯絡的 DC。 >[!Caution] >如果該主機無法取得:無法新增網域到樹系。 * 架構主機(Schema Master):可進行所有架構變更的 DC。要進行變更,通常以 Schema Admins 與 Enterprise Admins 群組的成員登入到架構主機。擁有這兩個群組的成員與適當全縣,可用指令碼(scripts)來編輯架構。 >[!Caution] >如果該主機無法取得:將不能對架構進行任何的變更。這些組長需要變更架構的應用程式安裝,如:Exchange 伺服器。 * 網域操作主機(Domain operations masters): * RID 主機(RID Master):當 AD DS 中建立一個物件時,建立該物件的 DC 會指定一個稱為 SID的唯一識別數字(identifing number)。確保沒有任何兩個 DC 將相同的 SID 指定給兩個不同的物件,RID主機會分配不同區段的 RIDs 給網域中的每個DC,已用在建置 SID 時使用。 >[!Caution] >如果該主機無法取得:網域中新增物件時會遇到困難,由於 DC 使用其現有的 RID,當他們最後用完時,將無法再建立新的物件。 * PDC 模擬器(PDC Emulator):掌管 PDC 模擬器主機的 DC 是網域的時間來源。樹系中的每個網域的 PDC 模擬器主機與樹系根網域的 PDC 模擬器主機同步他們的時間。可設定樹系根網域的 PDC 模擬器主機與可靠的外部時間來源進行同步。 >[!Caution] >如果該主機無法取得:使用者登入時可能會碰到麻煩,直到他們的密碼變更複寫到所有 DC。 * 基礎結構主機(Infrastructure Master):負責維護網域間的物件參考(refernces),如:當一個網域中的群組包含來自另廣域的成員,該主機維護參考的完整性。在檢視某個物件的 Security 索引標籤(tab),系統會查詢所列之SID,並將其轉換為名稱。 >[!Caution] >如果該主機無法取得:不是通用類別目錄的 DC 將無法檢查萬用群組成員資格(universal group memberships)或驗證使用者。 ### 角色的轉移和拿取 (Transfering and seizing roles) * 在一個 AD DS 環境中,FSMO的角色分散在這些 DC 之間,可能需要將一個角色從一個 DC 移動到另一個 DC。以下分為針對不同情境會有2種動作: * 轉移(Transferring): * 計畫之中,如:解除伺服器或平衡工作負載。 * 使用同步,擁有最新的資料,不會造成資料遺失。 * 透過嵌入式管理單元、Windows Powershell 或 ntdsutil.exe 來執行。 * 拿取(Seizing): * 非計畫之中且是最後手段,如:原 DC 硬體或系統故障,無法修復。 * 有不完整或過時的資料。 * 透過 Windows Powershell 或 ntdsutil.exe 來執行。 ### DC 虛擬化的最佳做法 (Best practices for domain controller virtualization) 1-31 1. 避免單點故障: * 確保每個網域至少有2個虛擬 DC 且在不同的虛擬化主機上,以降低虛擬化主機出現故障而失去所有 DC的風險。 3. 驗證時間服務: * 確保所有電腦,加入同一個時間服務基礎架構的 Hypervisor 主機與 DC guest。 5. 使用虛擬化技術允許虛擬機器產生識別碼: * 虛擬化基礎架構架構才能支援新虛擬機器產生識別碼,也支援虛擬 DC 的安全保護(safeguards)與複製。 7. 使用 Windows Server 2016 或更新版本作為虛擬 DC 的客體作業系統(guest operating system): * 這些版本才支援虛擬 DC 的安全保護(safeguards)。 9. 避免或停用檢查點: * 如果虛擬化主機或 DC 的客體作業系統不支援虛擬 DC 的安全保護,建議停用可能會建立的檢查點。 11. 注意提高安全性: * 確保虛擬化管理員跟 DC 管理員一樣可以信任。 13. 考慮利用複製(cloning): * 有助於在短時間內提供一個快速且簡單的方式來建立多個 DC。 15. 最多同時10個複製(Clone): * SYSVOL的檔案複寫僅允許同時10個複寫連線。 17. 考慮使用允許您的跨台範圍移動虛擬機器的虛擬化技術: * 建議在非尖峰時間將10個複製(Clone)搬移到遠端辦公室。 19. 調整命名策略以允許 DC 複製: * 以允許複製的 DC 保留來源 DC 名稱的前8個字元,然後再附加"-CLnnnn"。 ### 影片資源補充 * AD DS sign-in process {%youtube ux9x865pGPg %} * What is FSMO Role | Flexible Single Master Operation {%youtube YLlDOelu2gg %} * Flexible Single Master Operations Roles (FSMO) {%youtube y_pm22doxjQ %} * Operation Master FSMO Roles Simple Explaination | Fsmo Roles Windows server 2016 {%youtube ikfPM7_yMrw %} * Best practices for domain controller virtualization {%youtube DaK_n16zcdA %} * 10 tips for effective Active Directory design {%youtube 9WO8p4a3WFA %} ### 技術名詞補充 1. SID:主要用於微軟的 Windows 操作系統中,特別是在 Active Directory (AD) 和本地安全架構中,是用來唯一標識 Windows 安全主體(如用戶、群組、電腦等)的標識符。 * 一個完整的 SID 結構包括以下部分,例子:S-1-5-21-3623811015-3361044348-30300820-1013。 * S-1-5-21(前綴):S 表示 Security,1 是版本號,5 是標識授權機構(在 Windows 中通常為 NT Authority)。 * 域標識符(Domain Identifier):通常是 3 個十進制數字,唯一標識一個域或計算機。 * RID(Relative Identifier):唯一標識域或計算機內的特定安全主體。 * 應用: * 在 Windows 系統中,每個用戶帳戶、群組或電腦都有一個唯一的 SID。 * SID 被用來控制對資源的訪問權限。當用戶登錄時,系統會分配一個包含該用戶 SID 的存取權杖(access token),該權杖決定了用戶對系統資源的訪問權限。 3. RID:主要用於微軟的 Windows 操作系統中,特別是在 Active Directory (AD) 和本地安全架構中,RID 是 SID 的一部分,用來標識在一個域或本地電腦內的特定安全主體,且是由 DC 的相對標識符主機(RID Master)分配的,保證在網域內是唯一的。 * 應用: * RID 主要用於確定 SID 中的最後一部分,用來標識特定的帳戶或群組。如:網域內的兩個不同用戶可能有不同的 RID,但它們的域標識符部分相同。 * 在網域中,當創建一個新用戶或群組時,域控制器會從 RID 主機獲取一個新的 RID,並將其附加到域標識符上形成完整的 SID。 1. DSRM (Directory Services Restore Mode,目錄服務還原模式) * 是一種特別的啟動模式,用於 Microsoft Windows Server 操作系統中的 Active Directory Domain Services (AD DS) 的維護和恢復。這個模式允許管理員在需要進行 AD DS 數據庫修復、恢復或維護時,以安全的方式登錄到域控制器 (DC)。 * 主要功能是讓系統進入一個沒有啟動 AD DS 服務的狀態,這樣管理員就可以對 AD DS 數據庫進行維護或恢復操作。這個模式類似於「安全模式」,但特別針對 Active Directory 的問題解決和數據庫管理。 * DSRM 是 Windows Server 系統中關鍵的管理工具,用於處理 Active Directory 的故障恢復和維護情境。熟悉其操作和應用對於系統管理員維護企業 IT 基礎設施的營運和安全至關重要。 * 系統進入 DSRM 時: * AD DS 服務不會啟動:這防止了任何連接到 AD DS 的常規網絡操作,確保數據庫可以在獨立狀態下進行修復。 * 特殊的 DSRM 用戶帳戶:管理員使用 DSRM 登錄,這與一般的域管理員帳戶分開管理。 * 主要用於以下情境: * 資料庫修復: * 當 AD DS 數據庫 (ntds.dit) 損壞或出現一致性問題時,管理員可以使用 DSRM 修復數據庫。這包括使用內建工具(如 ntdsutil)進行脫機的維護操作。 * 系統恢復: * 如果 DC 無法正常啟動或 AD DS 資料庫無法加載,管理員可以進入 DSRM 進行故障排除。這可能包括恢復從備份中提取的數據庫或其他關鍵系統文件。 * 資料恢復: * 管理員可以使用 DSRM 進行資料還原操作,例如從備份中恢復 AD DS 對象,或者從損壞的資料庫中提取關鍵資料。 * 重設 DSRM 模式: * 由於 DSRM 命令與網域帳戶分開管理,因此管理員可能需要進入 DSRM 命令來重設,尤其是當它遺失或被遺忘時。 * 技術應用細節: * 進入 DSRM: * 要進入 DSRM,管理員需要在啟動過程中按下 F8,然後選擇「目錄服務恢復模式」。 * 登錄時使用的 DSRM 口令是在 DC 安裝期間設置的,這個命令不同於普通域管理員的命令。 * ntdsutil 工具:ntdsutil 是 Windows 提供的命令行工具,管理員可以使用它來進行 AD DS 的修復和維護工作。在 DSRM 中,可以使用 ntdsutil 進行操作,如 ESENTUTL 修復、數據庫脫機還原、元數據清除等。 * 安全考慮:由於 DSRM 命令對於系統的恢復至關重要,管理員必須確保口令的安全性並定期更新。進入 DSRM 後的操作具有極高的權限,必須謹慎操作以避免數據損失或其他不可逆的更改。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully