Resetting the Password for Logging In to an ECS with a Few Clicks
Function
This API is used to reset the password of the ECS management account, root or Administrator.
Constraints
- By default, there is no password complexity check that meets security requirements. No error message is displayed after an insecure password is entered.
- Before using this API, you must install the password reset plug-in. For details about how to download and install the one-click password reset plug-in, see Installing the One-Click Password Reset Plug-in on an ECS.
- You cannot determine whether an ECS supports password reset.
- If the password reset function fails to take effect, this API does not report an error.
- A new password takes effect after the ECS is started or restarted.
URI
PUT /v1/{project_id}/cloudservers/{server_id}/os-reset-password
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
server_id |
Yes |
Specifies the ECS ID. |
Request
Table 2 describes the request parameters.
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
reset-password |
Yes |
Object |
See Table 3. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
is_check_password |
No |
Boolean |
Specifies whether to check the password complexity. The default value is false. |
new_password |
Yes |
String |
Specifies the new password for logging in to an ECS. By default, this API does not check password security. To check password security, set is_check_password to true.
A new password must comply with the following rules:
|
Response
None
Example Request
Reset the password of the administrator account (root or Administrator) of a specified ECS. For security purposes, store the passwords in ciphertext in configuration files or environment variables.
PUT https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/os-reset-password { "reset-password": { "new_password": "$ADMIN_PASS", } }
Example Response
None
Returned Values
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot