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

Reset Ambari admin password

Solved Go to solution

Reset Ambari admin password

Rising Star

Hi,

I've launched HDP 2.5 on an AWS instance, for some reason i cannot login to admin. I wanted to reset the admin ambari password, i tried "ambari-admin-password-reset" but looks like it is for sandbox and it cannot found on the server.

Please advise how can I reset the password.

Thanks,

SJ

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Reset Ambari admin password

Super Mentor

@Sanaz Janbakhsh

Looks like you have missed few characters in the admin password. Can you please share the output of the following query?

Select user_name, user_password from ambari.users where user_name='admin';

.

Resulted password should be exactly

538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00
11 REPLIES 11

Re: Reset Ambari admin password

Super Mentor

@Sanaz Janbakhsh

On ambari Database you can run the folllowing command:

update ambari.users set user_password='538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00' where user_name='admin';

.

This will reset ambari user "admin" password as "admin".

Re: Reset Ambari admin password

Super Collaborator
@Sanaz Janbakhsh

In sandbox ambari-admin-password-reset should work. You can also reset password from DB.

-->From Ambari server host 'psql -U ambari ambari' (password 'bigdata')

--> In psql:

update ambari.users set user_password='538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00' where user_name='admin'

-->Quit psql

-->Run 'ambari-server restart'

Re: Reset Ambari admin password

Rising Star

Thanks,

I applied it and it gave me an server error , when i looked at the log i can find below. Any advice?

24 Feb 2017 01:01:41,275 WARN [ambari-client-thread-28] ServletHandler:561 - Error Processing URI: /api/v1/users/admin - (java.lang.IllegalArgumentException) Hex-encoded string must have an even number of characters 24 Feb 2017 01:01:41,275 WARN [ambari-client-thread-28] ServletHandler:561 - Error Processing URI: /api/v1/users/admin - (java.lang.IllegalArgumentException) Hex-encoded string must have an even number of characters

Re: Reset Ambari admin password

Super Collaborator

It looks that user_password is not set correctly. Can you make sure that there is no special characters included in password. Or set it again, dont copy paste from above, instead copy to notepad and make sure no specail characters included in the command before executing it on sandbox.

Re: Reset Ambari admin password

Super Mentor

@Sanaz Janbakhsh

Looks like you have missed few characters in the admin password. Can you please share the output of the following query?

Select user_name, user_password from ambari.users where user_name='admin';

.

Resulted password should be exactly

538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00

Re: Reset Ambari admin password

Rising Star

looks like it is set correctly but i cannot login !!!

user_name | user_password -----------+--------------- admin | admin (1 row)

SJ

Re: Reset Ambari admin password

Rising Star

as you can see the password stored as "admin" and not 538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00"

Re: Reset Ambari admin password

Super Mentor

@Sanaz Janbakhsh

The password i see in your output is not encrypted. Ambari uses Spring Security mechanism. And the password "admin" is stored in the database in encrypted manner. So in your database the password should be in encoded format.

12907-ambari-admin-password.png

So once you have the above mentioned entry in your ambari DB (users) table then after restarting ambari server you should be able to login to ambari UI using

username: admin

password: admin

Re: Reset Ambari admin password

Rising Star

I Just ran the same query that you sent me, not sure what steps did i miss?

SJ

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