Instantly share code, notes, and snippets.

Embed
What would you like to do?
1. Stop Ambari server
2. Log on to ambari server host shell
3. Run 'psql -U ambari-server ambari'
4. Enter password **** (this password is stored in
/etc/ambari-server/conf/password.dat)
5. In psql:
update ambari.users set
user_password='538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00'
where user_name='admin'
6. Quit psql
7. Run 'ambari-server restart'
Note: The password used in step 5 is the encrypted form of 'admin'.
====
To change passdword after installation :
ambari_password='zaidololo'
curl -u admin:admin -H "X-Requested-By: Goll" -X PUT -d "{ \"Users\": { \"user_name\": \"admin\", \"old_password\": \"admin\", \"password\": \"${ambari_password}\" }}" ambari.realtime002.test.goll.com:8080/api/v1/users/admin
@kuldeepsinghchauhan

This comment has been minimized.

Copy link

kuldeepsinghchauhan commented Jul 26, 2016

One can simply use "ambari-admin-password-reset"
This is the easiest way. You don't need to do anything else.

@dasgoll

This comment has been minimized.

Copy link
Owner Author

dasgoll commented Mar 4, 2017

ambari-admin-password-reset is only available with the Sandbox which I don't use.
But thanks for the tip :)

@aijanai

This comment has been minimized.

Copy link

aijanai commented Sep 26, 2018

works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment