Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

How to reset Ambari Admin password?

avatar

I have forgot Ambari Admin password after I had changed it from default, not able to login to Ambari UI now. Please suggest.

1 ACCEPTED SOLUTION

avatar

An easier way, just run command bellow from linux terminal in ambari server host:

ambari-admin-password-reset

View solution in original post

12 REPLIES 12

avatar
Explorer

You need to log into the database for example Postgres:

1. Log on to ambari server host shell

2. Run 'psql -U ambari-server ambari'

3. Enter password 'bigdata'

4. In psql:

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

5. Quit psql

6. Run 'ambari-server restart'

This will reset the admin account back to the password of 'admin'

avatar

Most customers actually have user ambari for the database, so it would actually be:

2. Run 'psql -U ambari ambari'

avatar

Password in #3 above is stored in /etc/ambari-server/conf/password.dat

avatar
New Contributor

Our installation had the password hash in another table.

 

update ambari.user_authentication set authentication_key='538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00' where user_id='1'

 

 

Note: user_id=1 was the admin in my case.

 

avatar

@pardeep.kumar@hortonworks.com

1) Postgres - As mentioned earlier

2) Mysql

Login as root user mysql -u root -p ( press enter, it will ask for password)

use mysql;

SET PASSWORD FOR 'admin'@'localhost'= PASSWORD('admin');

OR

UPDATE mysql.user SET Password=PASSWORD('admin') WHERE User='admin' AND Host='localhost';

localhost can be FQDN based on mysql setup

3) Oracle

Login as sys or system user

sqlplus sys as sysdba

alter user admin identified by 'admin';

avatar

An easier way, just run command bellow from linux terminal in ambari server host:

ambari-admin-password-reset

avatar

Guilhemme,

Could you please do a :

yum whatprovides 'ambari-admin-password-reset'

I just checked my 2.2.2 install and I do not see it:

[root@mon-orlan ~]# ambari (hit tab to complete)

ambari-python-wrap ambari-server ambari_server_main.py ambari-server.py

avatar
Mentor

Orlando, you need to make sure agent is running and then you can execute the command, you won't see this script on the FS but once agent is up you may execute the command.

avatar

For Users who are trying to Access this same thread for Ambari-2.7.0 and above, this commented method no longer works and you might need to refer to this link : https://community.hortonworks.com/articles/217295/ambari-270-how-to-reset-ambari-admin-password-from...

avatar
Contributor

Artem, can you tell me how or where the ambari-admin-password-reset command is located. I'm guessing it's an alias, but it's not set in root on the ambari server. So where is it defined since you're saying it's not a file of some sort.

avatar
New Contributor

Just to contribute with alternative options for such case: my HDP sandbox had been used since beginning of HDP tutorial, i figure some configs were spoiled at the point that needed agentes and services went down. To stop running out of time, I just downloaded/imported a new Virtualbox HDP sandbox - since that, i could get back on track - i.e. Interact with sandbox following tutorial instructions ("HDP > develop with hadoop > Hello World", "6. Interactive SQL on Hadoop with Hive LLAP ", "Enable Ambari Admin Login" , https://br.hortonworks.com/tutorial/learning-the-ropes-of-the-hortonworks-sandbox/#section3 , '2.2 Setup Ambari admin Password Manually' ) - it has gone fine.

avatar
Super Collaborator

The best answer is not up to date. From Ambari-2.7.0 this works (as commented by @Akhil S Naik😞 https://community.hortonworks.com/articles/217295/ambari-270-how-to-reset-ambari-admin-password-from...


- Dennis Jaheruddin

If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.
Labels