Created on 09-16-2022 12:59 PM - edited 09-16-2022 01:01 PM
Hello Team,
I have CDP Setup on premise and I am unable to login in ranger admin console.
Details
CDP: 7.1.7 | CM : 7.6.5 | Non Kerberised | Database : Mysql for all services
I have tried all the below ways
https://cloudera.ericlin.me/2020/02/how-to-update-ranger-web-ui-admin-users-password/
https://community.cloudera.com/t5/Support-Questions/Ranger-Password-reset/m-p/280992
In my case table: x_portal_user under ranger database was empty set.
SO I manually inserted values for fields
insert into x_portal_user(id,first_name,login_id,password,status) values(1,'Admin','admin','ceb4f32325eda6142bd65215f4c0f371',1);
With the above query it got inserted into table. Then did FLUSH PRIVILEGES , commit steps in mysql database.
Also tried further insert one more insert statement like above.
On Ranger Side configuration:
I have disable kerberos
Admin Authentication Method: Unix
Please help/suggest with the solution. Thanks
Created 09-17-2022 01:10 PM
To resolve this issue, you will have to update Ranger’s backend database directly to reset the password you will need to write access to Ranger’s backend database.
Using MySQL you know how to log into MySQL from either the command line
The users who can access Ranger’s Admin Web UI, also call Portal, are stored in a table called “x_portal_user“.
Query this table to confirm your Admin user is present in the table:
The password corresponds to the hashed value of “fdea9c9f5fabb9c4120b9834684f0ff0”, reset it to default value of “admin”, which has the hash value of “ceb4f32325eda6142bd65215f4c0f371”. Please run the below query:
After that, just log into Ranger Web UI using “admin” as username and “admin” as password, then update the password IMMEDIATELY through web UI.
Hope that helps
Geoffrey
Created on 09-21-2022 02:09 AM - edited 09-21-2022 02:23 AM
@Shelton updating the password option for x_portal_user table option --->This option I have already tried after inserting the values in empty set. But its in my case its not working
Created 09-21-2022 05:08 AM
The 2 SQL inserts are not identical the latter only updates the password while the former user and password.
Prior to your update did your backup the table?
Geoffrey
Created 03-19-2023 02:54 AM
Hi @dmharshit
In case you have empty x_portal_user table, you can re-init your db with ranger init script "range_core_db_<db-type>.sql"
Here is example command for mysql:
$ mysql -h hostname -u user ranger < `locate ranger_core_db_mysql.sql`
Restart Ranger then login with admin/admin.