HPE OneView

Resetting administrator password

Go to solution
Respected Contributor

Resetting administrator password

Using the REST API to reset the admininstrator password: 

curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --data '{ "newPassword" : "newpassw0rd" }' \
     --request PUT ${OneView}/rest/users/administrator/resetPassword | jq -r "."

  "data": {},
  "nestedErrors": [],
  "errorSource": null,
  "recommendedActions": [
    "Retry the operation from a local client."
  "details": "",
  "message": "Request not sent from a local client.",

What is considered a local client to an appliance device?


Apparently this really isn't possible.  Just easier to change from the gui.

Trusted Contributor

Re: Resetting administrator password

Hi @BradV 

Not sure if you wanted to change the Administrator's password to a different one and hence used this API.
There are three APIs in all to change the Administrator's password:

1. PUT /rest/users  lets you change the password to a new one.
"currentPassword" : "xxxxxxx",
"password" : "yyyyyy",
"type" : "UserAndPermissions",
"userName" : "administrator"

2. POST /rest/users/changePassword
This one is used only during first login to the appliance, forcing the administrator to change their password from the default to something else

3. PUT /rest/users/administrator/resetPassword
This API does not require any authorization (mentioned in the API doc).
It is usually used to reset the administrator's password if the adminisrator forgets their password.
It is available for use only after getting into the appliance via maintenance console using a challenge / response.
This is hence referred to as "being local" to the appliance when invoking this API.
Sorry that the "local client" reference in the error confused you.
We'll look at improving the error message.

Let me know if you have further questions.



I am an HPE employee

Accept or Kudo

Respected Contributor

Re: Resetting administrator password

Thanks!  That helped a lot!  We have to periodically change passwords.  I let to have everything documented so that even someone not familiar with the topic can execute.  So, having a command line method to change the administrator's password helps!  :)