Hi,

It seems that theprocedure described below in the user mailing list
March 2014 no longer works (with Ambari 1.7), is there a recommended
alternative?

*******************

No, admins cannot change user passwords via configs.sh; configs.sh is a
wrapper that uses the API to manage "configuration" objects that do not
deal with user passwords.
However, admins can change passwords directly via the API (or with a
similar wrapper script).
Here's an example:

curl -i -uadmin:admin -H "X-Requested-By: ambari" -X PUT -d
'{"Users":{"roles":"admin,user","password":"mysecret","old_password":"admin"}}'http://localhost:8080/api/v1/users/<user-name>

where:
* "roles" is a comma-delimited list of roles that the user should belong to
"admin,user" for admin users; just "user" for non-admin users.
* "password" is the new password to set for the user
* "old_password" is misleading, but* it's the password of the admin user
invoking this call*.  If you omit this parameter, the API call seems to go
thru, but the password does not actually change.  This is a bit redundant
and confusing, but that's how it works today...

I hope this helps!

Yusaku

****************

Regards

Reply via email to