Red Hat Bugzilla – Bug 1257748
[RFE] Add the ability to change the password for a user through API, especially for 'admin' user
Last modified: 2016-08-02 21:33:05 EDT
Description of problem:
RHCI needs the ability to change the CFME admin user's password during a deployment.
We'd like to be able to interact with a REST API to alter the admin user's password.
Can you please provide verification steps?
Verified fixed in version 126.96.36.199
1. Get admin user via rest api
2. Send query with new password
3. Try to login in cfme with new password
You can run code in ipython:
from cfme.login import login
from cfme import Credential
from cfme.configure.access_control import User
from fixtures.pytest_store import store
rest_api = store.current_appliance.rest_api
admin_user = rest_api.collections.users.find_by(userid='admin')
new_password = 'test'
# This part could be done manually
cred = Credential(principal=admin_user.userid, secret=new_password)
new_user = User(credential=cred)
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.