AWS Directory Service
管理指南 (版本 1.0)
AWS 文档中描述的 AWS 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅中国的 AWS 服务入门

重置用户密码

Users must adhere to password policies as defined in the directory. Sometimes this can get the best of users, including the directory admin, and they forget their password. When this happens, you can quickly reset the user's password using AWS Directory Service if the user resides in either a Simple AD or AWS Managed Microsoft AD directory.

You can reset the password for any user in your directory with the following exceptions:

  • For Simple AD, you cannot reset the password for any user that is a member of either the Domain Admins or Enterprise Admins group except for the Administrator user.

  • For AWS Managed Microsoft AD, you cannot reset the password for any user that is in an OU other than the OU that is based off of the NetBIOS name you typed when you created your directory. For example, you cannot reset the password for a user in the AWS Reserved OU. For more information about the OU structure for an AWS Managed Microsoft AD directory, see 创建的内容.

You can use any of the following methods to reset a user's password.

Method 1: To reset a user password (AWS 管理控制台)

  1. In the AWS Directory Service console navigation pane, under Active Directory, choose Directories, and then select the directory in the list where you want to reset a user's password.

  2. Choose Actions, and then choose Reset user password.

  3. In the Reset user password dialog, in Username type the username of the user whose password needs to change.

  4. Type a password in New password and Confirm Password, and then choose Reset password.

Method 2: To reset a user password (Windows PowerShell)

  1. Open Windows PowerShell.

  2. Type the following command and replace the username "joebob" and password "P@ssw0rd" with your desired credentials. See Reset-DSUserPassword Cmdlet for more information.

    Reset-DSUserPassword -UserName joebob -DirectoryId d-1234567890 -NewPassword P@ssw0rd

Method 3: To reset a user password (AWS CLI)

  1. Open the AWS CLI.

  2. Type the following command and replace the username "joebob" and password "P@ssw0rd" with your desired credentials. See reset-user-password in the AWS CLI Command Reference for more information.

    aws ds reset-user-password --directory-id d-1234567890 --user-name joebob --new-password P@ssw0rd