Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

rest api to change password for ambari users


rest api to change password for ambari users

i want to change ambari users passwords using ambari rest api and want to design a webpage so there i can provide a button when user click on reset button it prompt to change password ? how rest api can be integrated to web language ?


Re: rest api to change password for ambari users

Super Mentor

@Anurag Mishra


# curl -i -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"Users/password":"jaypwd1","Users/old_password":"admin"}'

HTTP/1.1 200 OK
X-Frame-Options: DENY
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Cache-Control: no-store
Pragma: no-cache
Set-Cookie: AMBARISESSIONID=wzd7yk0ho2sq1dlip3au1lscq;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
User: admin
Content-Type: text/plain
Content-Length: 0

Here : In the "old_password" please enter the ambari admin password (it is not the old password of "jay" user, Instead it is ambari admin password.)
Changed "" with your ambari server FQDN
username "jay" with your desired username whose password you want to change.
"jaypwd1" is the new password for user "jay"


Don't have an account?
Coming from Hortonworks? Activate your account here