The root (Administrator) password is the most important of all passwords on any server. You should never log in as root or Administrator, but you sometimes have to do it for basic initial administrative tasks like adding users, setting up sudo privileges, etc. Your cloud infrastructure provider will most likely provide a web interface for changing the root password, but you can also do it via the OpenStack Compute API.
What you need to do is use a POST request directed at /servers/id/action, where id is the numeric server ID. You also need to include a payload with the description of the action you want to perform on your server (changePassword), the parameters of those actions, and their values. It has to be a JSON dictionary structure:
{
"changePassword" : {
"adminPass" : "dontusesshhhforpassword"
}
}
If you want to use curl to reset root or Administrator, here's how you can do it:
$ curl -s -X POST -H "X-Auth-Token:999888777666" -d '{"changePassword": {"adminPass": "dontusesshhhforpassword"}}' http://localhost:8774/v1.1/openstack/servers/3/action
