user change-password - AWS CloudHSM

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

user change-password

使用 CloudHSM CLI 中的user change-password命令更改集群中现有用户的 AWS CloudHSM 密码。要对用户启用 MFA,请使用 user change-mfa 命令。

所有用户都可更改自己的密码。此外,具有管理员角色的用户可以更改集群中其他用户的密码。您无需输入当前密码即可进行此更改。

注意

您无法更改当前已登录集群的用户的密码。

用户类型

以下用户均可运行此命令。

  • Admin

  • 加密用户 (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>

要运行此操作的集群的 ID。

必需:如果已配置多个集群。

<APPROVAL>

指定要批准操作的已签名仲裁令牌文件的文件路径。仅当仲裁用户服务仲裁值大于 1 时才需要。

<DEREGISTER-MFA>

注销 MFA 公有密钥(如有)。

<DEREGISTER-QUORUM>

注销仲裁公有密钥(如有)。

<PASSWORD>

指定用户的纯文本新密码。

必需:是

<ROLE>

指定赋予用户账户的角色。此参数为必需参数。有关 HSM 上的用户类型的详细信息,请参阅了解 HSM 用户

有效值

  • 管理员:管理员可以管理用户,却无法管理密钥。

  • 加密用户:加密用户可以创建管理密钥并在加密操作中使用密钥。

<USERNAME>

为用户指定友好名称。最大长度为 31 个字符。唯一允许的特殊字符是下划线 ( _ )。

用户名在创建之后无法更改。在 CloudHSM CLI 命令中,角色和密码区分大小写,但用户名不区分大小写。

必需:是

相关 主题