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.

@Jacqualin jasmin, I am on AWS/EC2/HDP, and I lost my admin passwd, I dont have rest command in my system

Solved Go to solution
Highlighted

@Jacqualin jasmin, I am on AWS/EC2/HDP, and I lost my admin passwd, I dont have rest command in my system

Contributor

It is strange, I add a new user admin1 and setup password for this user. after this, I lost my admin passwd, I dont know how it related. however, I try to reset admin passwd by: ambari-admin-password-reset, I got this,

which /usr/sbin/ambari-admin-password-reset

/usr/bin/which: no ambari-admin-password-reset in (/usr/sbin)

what can I do from this point,

thank you for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: @Jacqualin jasmin, I am on AWS/EC2/HDP, and I lost my admin passwd, I dont have rest command in my system

Super Mentor

@Robin Dong

The "ambari-admin-password-reset" utility command is present only on HDP Sandbox to reset ambari admin credentials.

These does not come with default Ambari or HDP installation.

So if you forgot your ambari admin credentials and if you wan tto reset them to admin/admin then you will have to run the following Ambari DB sql query (For example if ambari DB is postgres and the DB password is "bigdata" (default) then we can try the following):

# psql -U ambari ambari
Password for user ambari:  bigdata
psql (8.4.20)
Type "help" for help.

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

.

Followed by ambari restart and then you should be able to login to ambari using admin/admin credentials.

- The issue you reported is strange, usually creating a new user (admin1) does not alter default admin credentials. May be we can check the ambari db "users" table to see the encrypted passwords or the DB logs to see if someone executed some Db queries which caused ambari admin user credential changes.

View solution in original post

2 REPLIES 2
Highlighted

Re: @Jacqualin jasmin, I am on AWS/EC2/HDP, and I lost my admin passwd, I dont have rest command in my system

Super Mentor

@Robin Dong

The "ambari-admin-password-reset" utility command is present only on HDP Sandbox to reset ambari admin credentials.

These does not come with default Ambari or HDP installation.

So if you forgot your ambari admin credentials and if you wan tto reset them to admin/admin then you will have to run the following Ambari DB sql query (For example if ambari DB is postgres and the DB password is "bigdata" (default) then we can try the following):

# psql -U ambari ambari
Password for user ambari:  bigdata
psql (8.4.20)
Type "help" for help.

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

.

Followed by ambari restart and then you should be able to login to ambari using admin/admin credentials.

- The issue you reported is strange, usually creating a new user (admin1) does not alter default admin credentials. May be we can check the ambari db "users" table to see the encrypted passwords or the DB logs to see if someone executed some Db queries which caused ambari admin user credential changes.

View solution in original post

Re: @Jacqualin jasmin, I am on AWS/EC2/HDP, and I lost my admin passwd, I dont have rest command in my system

Contributor

yes, thank you, all working. I missed ';' at end of update statement.

thanks again.

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