變更使用者密碼 - AWS CloudHSM

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

變更使用者密碼

使用 CloudHSM CLI 中的user change-password命令來變更叢集中現有使用者的 AWS CloudHSM 密碼。若要為使用者啟用 MFA,請使用 user change-mfa 命令。

任何使用者都可以變更自己的密碼。此外,具有管理員角色的使用者可以變更叢集中其他使用者的密碼。您無需輸入目前的密碼即可進行變更。

注意

您無法變更目前已登入叢集使用者的密碼。

使用者類型

下列使用者可以執行此命令。

  • 管理員

  • 加密使用者 (CU)

語法

注意

若要為使用者啟用多重要素驗證 (MFA),請使用 user change-mfa 命令。

aws-cloudhsm > help user change-password Change a user's password Usage: cloudhsm-cli user change-password [OPTIONS] --username <USERNAME> --role <ROLE> [--password <PASSWORD>] Options: --cluster-id <CLUSTER_ID> Unique Id to choose which of the clusters in the config file to run the operation against. If not provided, will fall back to the value provided when interactive mode was started, or error --username <USERNAME> Username of the user that will be modified --role <ROLE> Role the user has in the cluster Possible values: - crypto-user: A CryptoUser has the ability to manage and use keys - admin: An Admin has the ability to manage user accounts --password <PASSWORD> Optional: Plaintext user's password. If you do not include this argument you will be prompted for it --approval <APPROVAL> Filepath of signed quorum token file to approve operation --deregister-mfa <DEREGISTER-MFA> Deregister the user's mfa public key, if present --deregister-quorum <DEREGISTER-QUORUM> Deregister the user's quorum public key, if present -h, --help Print help (see a summary with '-h')

範例

以下範例說明如何使用 user change-password 重設叢集中目前使用者或其他任何使用者的密碼。

範例 :變更您的密碼

叢集中的任何使用者均可使用 user change-password 變更自己的密碼。

以下輸出顯示 Bob 目前正以加密使用者 (CU) 的身分登入。

aws-cloudhsm > user change-password --username bob --role crypto-user Enter password: Confirm password: { "error_code": 0, "data": { "username": "bob", "role": "crypto-user" } }

引數

<CLUSTER_ID>

執行此作業的叢集識別碼。

必要:如果已設定多個叢集。

<APPROVAL>

指要核准操作的已簽署規定人數權杖檔案的檔案路徑。只有在規定人數使用者服務規定人數值大於 1 時才需要執行此操作。

<DEREGISTER-MFA>

取消註冊 MFA 公有金錀 (如有)。

<DEREGISTER-QUORUM>

取消註冊規定人數公有鑰 (如有)。

<PASSWORD>

指使用者的純文字新密碼。

必要:是

<ROLE>

指賦予使用者帳戶的角色。此為必要參數。如需 HSM 上使用者類型的詳細資訊,請參閱了解 HSM 使用者

有效值

  • 管理員:管理員可以管理使用者,但無法管理金鑰。

  • 加密使用者:加密使用者可以建立管理金鑰並在密碼編譯操作時使用該金鑰。

<USERNAME>

為使用者指定易記的名稱。長度上限為 31 個字元。允許的唯一特殊字元是底線 (_)。

建立使用者之後,您就無法再變更使用者的名稱。在 CloudHSM CLI 命令中,角色和密碼需區分大小寫,但使用者名稱不區分大小寫。

必要:是

相關主題