update an admin user password via the REST API?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

update an admin user password via the REST API?

L0 Member

I have searched high and low but have not found a way to set a password for an admin user via the API.  Does anybody know if this is even possible or if you need to use the UI or CLI only?

Marc

4 REPLIES 4

L6 Presenter

Gave it a shot but I believe I'm missing something here as well.

10-3-2013 9-35-18 PM.png

10-3-2013 9-35-28 PM.png

L4 Transporter

Hello,

Here's the xpath value that worked for me:

xpath=/config/mgt-config/users/entry[@name='admin1']/fnRL/G5lXVMug

It should say:

<response status="success" code="19">

<result/>

</response>


Thanks,

Aditi

Aditi,

I ran this as well with a success code, but it does not appear to change any passwords.  Did you confirm you were able to log in with a new password after the above change?  Also what password is set by that api call? 

Thanks,

Marc

Here is the correct call to modify the phash value of an administrator.

http://<firewall>/api/?type=config&action=set&key=<key>&xpath=/config/mgt-config/users/entry[@name='username']&element=<phash>password</phash>

Replace the <firewall>, <key>, username, and password attributes to appropriate values.  Once the call is made you should be able to see the changed value via the get API call but the change will not take effect until a commit is completed.

You can also use an API call to generate the password hash.

http://<firewall>/api/?type=op&cmd=<request><password-hash><username>user</username><password>password</password></password-hash></request>

  • 3361 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!