Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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 ?


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"


Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.