

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 更新自我管理 Active Directory 組態
<a name="update-self-ad-config"></a>

若要協助確保 Amazon FSx 檔案系統的持續、不間斷可用性，您必須在下列任何 Active Directory 屬性變更時更新檔案系統的 Active Directory 組態：
+ DNS 伺服器 IP 地址
+ 自我管理 Active Directory 的服務帳戶憑證

當您更新 Amazon FSx 檔案系統的自我管理 Active Directory 組態時，在套用更新時，檔案系統的狀態會從**可用**切換到**更新**。確認狀態在套用更新後切換回**可用** – 請注意，更新可能需要幾分鐘才能完成。如需詳細資訊，請參閱[監控自我管理 Active Directory 更新](monitor-self-ad-update.md)。

如果更新的自我管理 Active Directory 組態發生問題，檔案系統狀態會切換到**設定錯誤**。此狀態會在主控台、API 和 CLI 的檔案系統描述旁顯示錯誤訊息和建議的修正動作。採取建議的修正動作後，請確認檔案系統的狀態最終變更為**可用**。

**重要**  
如果您使用新的服務帳戶更新檔案系統，請確保新的服務帳戶具有與檔案系統相關聯之現有電腦物件**的完整控制**許可。

如需自我管理 Active Directory 組態相關問題的疑難排解資訊，請參閱 [檔案系統處於設定錯誤狀態](misconfigured-ad-config.md)。

您可以使用 AWS 管理主控台、Amazon FSx API 或 AWS CLI 來更新服務帳戶登入資料，以及檔案系統自我管理 Active Directory 組態的 DNS 伺服器 IP 地址。您可以隨時使用 AWS 管理主控台、 CLI 和 API 追蹤自我管理 Active Directory 組態更新的進度。如需詳細資訊，請參閱[監控自我管理 Active Directory 更新](monitor-self-ad-update.md)。

**更新自我管理 Active Directory 組態 （主控台）**

1. 在 [https://console.aws.amazon.com/fsx/](https://console.aws.amazon.com/fsx/)：// 開啟 Amazon FSx 主控台。

1. 導覽至**檔案系統**，然後選擇您要更新自我管理 Active Directory 組態的 Windows 檔案系統。

1. 在**網路與安全**索引標籤中，選擇**更新** **DNS 伺服器 IP 地址**或服務帳戶使用者名稱，視您要更新的 Active Directory 屬性而定。

1. 在出現的對話方塊中輸入新的 DNS 伺服器 IP 地址，或新的服務帳戶登入資料 （使用者名稱和密碼） 或秘密 ARN。您可以使用 AWS Secrets Manager 來存放您的登入資料。如需詳細資訊，請參閱[使用 存放 Active Directory 登入資料 AWS Secrets Manager](self-managed-AD.md#bp-store-ad-creds-using-secret-manager-windows)。

1. 選擇**更新**以啟動 Active Directory 組態更新。

   您可以使用 AWS 管理主控台 或 [監控更新進度](monitor-self-ad-update.md) AWS CLI。

**更新自我管理 Active Directory 組態 (CLI)**
+ 若要更新 FSx for Windows File Server 檔案系統的自我管理 Active Directory 組態，請使用 AWS CLI 命令 [update-file-system](https://docs.aws.amazon.com/cli/latest/reference/fsx/update-file-system.html)。設定下列參數：
  + `--file-system-id` 至您正在更新之檔案系統的 ID。
  + `UserName` 自我管理 Active Directory 服務帳戶的新使用者名稱。
  + `Password` 自我管理 Active Directory 服務帳戶的新密碼。
  + `DomainJoinServiceAccountSecret` 包含 Active Directory 網域上服務帳戶的使用者名稱和密碼的 AWS Secrets Manager 秘密
**注意**  
您無法同時提供使用者名稱/密碼和網域聯結服務帳戶秘密，以連線至您的 Active Directory。僅提供一組登入資料。
  + `DnsIps` 自我管理 Active Directory DNS 伺服器的 IP 地址。

  ```
  aws fsx update-file-system --file-system-id fs-0123456789abcdef0 \
    --windows-configuration 'SelfManagedActiveDirectoryConfiguration={UserName={{username}},Password={{password}},\
       DnsIps=[{{192.0.2.0}},{{192.0.2.24}}]}'
  ```

  如果更新動作成功，服務會傳回 HTTP 200 回應。回應中的`AdminstrativeActions`物件描述請求及其狀態。