FortiSIEM
FortiSIEM provides Security Information and Event Management (SIEM) and User and Entity Behavior Analytics (UEBA)
alaxkar
Staff
Staff
Article Id 367540
Description This article describes how to reset admin credentials after locking the account using SQL queries.
Scope FortiSIEM v7.1.x, v7.2.1.
Solution

This script will help to add a new test user when the existing add-super-admin.sql script does not add a new test user. 

 

Step 1. Log into FortiSIEM through SSH using admin user access. 

  • Create a file with name reset-admin-password.sql:

 

vim /opt/phoenix/deployment/add-super-test-admin.sql

 

Step 2. Enter below SQL queries below in the file and save the file. 

 

INSERT INTO ph_user VALUES (nextval ('ph_global_gen'), 1283889301935, 1, 0, 1283889301935, 0, true, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'test', 'test', true, NULL, (select id from ph_rbac_profile where name='Full Admin'));
INSERT INTO ph_contact VALUES (nextval ('ph_global_gen'), 1283889301935, 1, 0, 1283889301935, 0, NULL, NULL, NULL, NULL, NULL, 'not_set', NULL, NULL, NULL, false, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO ph_user2contact VALUES (currval('ph_global_gen')-1, currval('ph_global_gen'));
INSERT INTO ph_sec_ident VALUES (nextval ('ph_global_gen'), 1283889301938, 0, 1283889301938, 0, 0, 1, 'test', 'Test*123', NULL, currval('ph_global_gen')-2, NULL);

 

Step 3. Run below command:

 

psql -d phoenixdb -U phoenix -f /opt/phoenix/deployment/add-super-test-admin.sql

 

This will reset admin credentials and the script will work. Now, try to log in using the below credentials.

 

Username:-  test

Password:- Test*123

 

Admin password can be reset from GUI.