Unable to login - How to reset the masteradmin password if forgotten
search cancel

Unable to login - How to reset the masteradmin password if forgotten

book

Article ID: 206620

calendar_today

Updated On:

Products

DX Operational Observability

Issue/Introduction

how to reset the masteradmin password?

Environment

DX O2 OnPrem

Resolution

The admin password is stored in a Postgres database, follow the below steps to manually update it

a) Check postgres pods are running:

kubectl get pods -n<namespace> | grep postgres

dxi-postgres-68bcfbdfdc-6vzzg                          1/1     Running     12 (8d ago)   12d
dxi-postgres-schema-bbdd65f5b-478bm                    1/1     Running     0             15d


b) Establish an interactive session to the pod

kubectl exec -it <dxi-postgresql-pod> -n<namespace> -- bash

# kubectl exec -it dxi-postgres-68bcfbdfdc-6vzzg bash -ndxi -- bash


c) start psql and connect to aoplatform_db database

bash-4.2$ psql aoplatform_db
psql (16.11 (Debian 16.11-1.pgdg13+1))
Type "help" for help.

aoplatform=#

d) list all database objects
 
aoplatform=# \d
                                    List of relations
 Schema |                            Name                            |   Type   |  Owner
--------+------------------------------------------------------------+----------+---------
 public | adminaudittrailseq                                         | sequence | aopuser
 public | ae_int_feature_store                                       | table    | aopuser
 public | ae_int_job_hit_count_history                               | table    | aopuser
 public | ae_int_recommendation                                      | table    | aopuser
 public | ae_job_metadata                                            | table    | aopuser
 public | ae_job_run_info                                            | table    | aopuser
 public | ae_job_run_info_id_seq                                     | sequence | aopuser
 public | ae_jobs_tags                                               | table    | aopuser
 public | ae_rar_models                                              | table    | aopuser
 public | ae_recommended_log                                         | table    | aopuser
 public | ae_recommended_log_id_seq                                  | sequence | aopuser
 public | aps_registry                                               | table    | aopuser
 public | aps_whitelist                                              | table    | aopuser
 public | aradminaudittrail                                          | table    | aopuser
 public | aradminbasicauthpwdhistory                                 | table    | aopuser
 public | aradminbasicauthuser                                       | table    | aopuser
 public | aradmincustomrole                                          | table    
...
 
e) reset the master password to <password>
 
UPDATE aradminbasicauthuser
SET strikecount = 0,
  password = '<password>',
    passwdresettime = now() AT TIME ZONE 'UTC'
WHERE
  userid='MASTERADMIN'AND
  orgname='MASTERADMIN';
 
UPDATE 1

NOTE: after you have changed the password and if you would like to set a new and different password, you will need to login as the Masteradmin the reset the password