Resetting the BMS Password by a Few Clicks
Function
This API is used to reset the password of the BMS management account (root or Administrator) when one-click password reset is supported.
You can use the Querying Whether One-Click Password Reset Is Supported API to check whether one-click password reset is supported.
Constraints
- There is no password complexity check that meets security requirements. No error message is displayed after a non-security password is entered.
- Before using this API, you must install password reset plug-ins. For details about how to download and install the password reset plug-ins, see Installing the One-Click Password Reset Plug-in in Bare Metal Server User Guide.
- If the password reset function fails to take effect, this API does not report an error.
- A new password takes effect after the BMS is started or restarted.
URI
PUT /v1/{project_id}/baremetalservers/{server_id}/os-reset-password
Table 1 lists the URI parameters.
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
|
server_id |
Yes |
Specifies the BMS ID. You can obtain the BMS ID from the BMS console or using the Querying BMSs (Native OpenStack API) API. |
Request
- Request parameters
Parameter
Mandatory
Type
Description
reset-password
Yes
Object
Provides reset-password details. For details, see Table 2.
Table 2 reset-password field data structure description Parameter
Mandatory
Type
Description
new_password
Yes
String
Specifies the new BMS password.
This API does not check password security. Ensure that the password complexity complies with the password rules.
The password must comply with the following rules:
- Consists of 8 to 26 characters.
- Contains at least three of the following character types:
- Cannot contain the username or the username in reverse.
- Cannot contain more than two characters in the same sequence as they appear in the username. (This requirement applies only to Windows BMSs.)
- Example request
1
PUT https://{BMS Endpoint}/v1/2e62dec99940499d93717c2789759015/baremetalservers/77616c78-0bc4-4156-b24b-4286586ac350/os-reset-password
1 2 3 4 5
{ "reset-password": { "new_password": "Fusion@123" } }
Response
N/A
Returned Values
|
Return Value |
Description |
|---|---|
|
204 |
The server has processed the request but did not return any content. |
For details about other returned values, see Status Codes.
Error Codes
See Error Codes.
Last Article: Querying Whether One-Click Password Reset Is Supported
Next Article: Obtaining the Password of a Windows BMS
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.