- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
10-03-2013 11:38 AM
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
10-06-2013 09:39 PM
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">
</response>
Thanks,
Aditi
10-15-2013 08:52 AM
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
10-15-2013 09:20 AM
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>
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!