How to reset Ambari server password to admin ?

First you need to check which database are you using . For that run below command on ambari server.

cat /etc/ambari-server/conf/ambari.properties | grep server.jdbc.database

server.jdbc.database=<DATABASE_TYPE>
server.jdbc.database_name=<DATABASE_NAME>

Now as per the DATABASE_TYPE you need to select by which method you need to go.

1. If DATABASE_TYPE is postgresql

You need to log into the Postgres Database:

A. Log on toPostgres Database host shell

B. Run ‘psql -U ambari ambari’

C. Enter password ‘bigdata’

D. In psql:

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

E. Quit psql

F. Run ‘ambari-server restart’ from ambari server host shell.

This will reset the admin account back to the password of ‘admin’ also please note Password in #C above is stored in /etc/ambari-server/conf/password.dat file on ambari server host.

 

2. If DATABASE_TYPE is Mysql

A. Log on to MySql Database host shell

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

C. mysql>use mysql;

D. 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

E. Quit mysql

F. Run ‘ambari-server restart’ from ambari server host shell.

 

3. If DATABASE_TYPE is Oracle

A. Log on to Oracle Database host shell

B. Login as sys or system user

C. sqlplus sys as sysdba

D. alter user admin identified by ‘admin’;

E. Quit Oracle

F. Run ‘ambari-server restart’ from ambari server host shell.

 

23 thoughts on “How to reset Ambari server password to admin ?”

  1. I’m now not certain the place you’re getting your information, however good topic. I needs to spend a while studying much more or working out more. Thanks for wonderful info I was looking for this information for my mission.

  2. Excellent blog right here! Also your site rather a lot up fast! What host are you using? Can I get your affiliate hyperlink to your host? I wish my web site loaded up as fast as yours lol

  3. Hi just wanted to give you a brief heads up and let you know a few of the pictures aren’t loading properly. I’m not sure why but I think its a linking issue. I’ve tried it in two different internet browsers and both show the same outcome.

  4. When I initially commented I clicked the “Notify me when new comments are added” checkbox
    and now each time a comment is added I get four e-mails with the
    same comment. Is there any way you can remove people from that service?
    Thanks!

  5. Your style is so unique in comparison to other folks I have read stuff from.
    Thanks for posting when you’ve got the opportunity, Guess I’ll just
    book mark this blog.

  6. Howdy are using WordPress for your blog platform?
    I’m new to the blog world but I’m trying to get started and create my own.
    Do you require any coding expertise to make your own blog?
    Any help would be really appreciated!

  7. I’m extremely inspired with your writing skills and also with the layout
    in your blog. Is that this a paid subject matter or did you customize it yourself?

    Either way stay up the excellent quality writing, it’s rare to look a nice
    blog like this one today..

  8. My spouse and I stumbled over here coming from a different web
    page and thought I may as well check things out.
    I like what I see so now i’m following you. Look forward to exploring
    your web page yet again.

  9. Your style is unique compared to other folks I have read stuff from.
    I appreciate you for posting when you’ve got the opportunity,
    Guess I will just bookmark this web site.

Leave a Reply

Your email address will not be published. Required fields are marked *