You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Satyanarayana Jampa <sj...@innominds.com> on 2016/03/21 06:59:47 UTC

Do we have API for change password

Hi,
  Just wondering if we have an API to change the Ambari password, instead of logging in and changing the password.
  Actually I have a custom script which will take username and password as argument which I have to use it for configuration before installing Ambari.

Thanks,
Satya.


RE: Do we have API for change password

Posted by Satyanarayana Jampa <sj...@innominds.com>.
Thank you it worked for me too.... :)

From: Dmitry Sen [mailto:dsen@hortonworks.com]
Sent: 21 March 2016 20:02
To: user@ambari.apache.org
Subject: Re: Do we have API for change password


It works for me:



curl -i -u admin:admin  'http://192.168.120.6:1081/api/v1/users/admin' -X PUT -H 'X-Requested-By: ambari' --data-binary '{"Users/password":"newpasswd","Users/old_password":"admin"}'



BR,

Dmytro Sen



________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Monday, March 21, 2016 7:59 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Do we have API for change password

Hi,
  Just wondering if we have an API to change the Ambari password, instead of logging in and changing the password.
  Actually I have a custom script which will take username and password as argument which I have to use it for configuration before installing Ambari.

Thanks,
Satya.


RE: Do we have API for change password

Posted by Satyanarayana Jampa <sj...@innominds.com>.
Got it working
curl -w "%{http_code}" -o /dev/null --user admin:admin ........

From: Satyanarayana Jampa [mailto:sjampa@innominds.com]
Sent: 22 March 2016 09:55
To: user@ambari.apache.org
Subject: RE: Do we have API for change password

Can we get the HTTP response code in this?

From: Dmitry Sen [mailto:dsen@hortonworks.com]
Sent: 21 March 2016 20:02
To: user@ambari.apache.org
Subject: Re: Do we have API for change password


It works for me:



curl -i -u admin:admin  'http://192.168.120.6:1081/api/v1/users/admin' -X PUT -H 'X-Requested-By: ambari' --data-binary '{"Users/password":"newpasswd","Users/old_password":"admin"}'



BR,

Dmytro Sen



________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Monday, March 21, 2016 7:59 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Do we have API for change password

Hi,
  Just wondering if we have an API to change the Ambari password, instead of logging in and changing the password.
  Actually I have a custom script which will take username and password as argument which I have to use it for configuration before installing Ambari.

Thanks,
Satya.


RE: Do we have API for change password

Posted by Satyanarayana Jampa <sj...@innominds.com>.
Can we get the HTTP response code in this?

From: Dmitry Sen [mailto:dsen@hortonworks.com]
Sent: 21 March 2016 20:02
To: user@ambari.apache.org
Subject: Re: Do we have API for change password


It works for me:



curl -i -u admin:admin  'http://192.168.120.6:1081/api/v1/users/admin' -X PUT -H 'X-Requested-By: ambari' --data-binary '{"Users/password":"newpasswd","Users/old_password":"admin"}'



BR,

Dmytro Sen



________________________________
From: Satyanarayana Jampa <sj...@innominds.com>>
Sent: Monday, March 21, 2016 7:59 AM
To: user@ambari.apache.org<ma...@ambari.apache.org>
Subject: Do we have API for change password

Hi,
  Just wondering if we have an API to change the Ambari password, instead of logging in and changing the password.
  Actually I have a custom script which will take username and password as argument which I have to use it for configuration before installing Ambari.

Thanks,
Satya.


Re: Do we have API for change password

Posted by Dmitry Sen <ds...@hortonworks.com>.
It works for me:


curl -i -u admin:admin  'http://192.168.120.6:1081/api/v1/users/admin' -X PUT -H 'X-Requested-By: ambari' --data-binary '{"Users/password":"newpasswd","Users/old_password":"admin"}'


BR,

Dmytro Sen


________________________________
From: Satyanarayana Jampa <sj...@innominds.com>
Sent: Monday, March 21, 2016 7:59 AM
To: user@ambari.apache.org
Subject: Do we have API for change password

Hi,
  Just wondering if we have an API to change the Ambari password, instead of logging in and changing the password.
  Actually I have a custom script which will take username and password as argument which I have to use it for configuration before installing Ambari.

Thanks,
Satya.