Created on 09-16-2022 12:59 PM - edited 09-16-2022 01:01 PM
I have CDP Setup on premise and I am unable to login in ranger admin console.
CDP: 7.1.7 | CM : 7.6.5 | Non Kerberised | Database : Mysql for all services
I have tried all the below ways
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
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
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.