Skip to content

Instantly share code, notes, and snippets.

@dasgoll
Last active May 29, 2021 03:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save dasgoll/68bd6e6e60fd219ec7e3 to your computer and use it in GitHub Desktop.
Save dasgoll/68bd6e6e60fd219ec7e3 to your computer and use it in GitHub Desktop.
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
Copy link

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

@dasgoll
Copy link
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
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