Create a new password for the Cortex XSOAR administrator account, if you are unable to log in, by manually adding a new administrator.
If the administrator cannot log in and does not know the password, you need to add a new administrator. You can then change the password for the current administrator.
To add a new administrator, you need to create a one-time configuration (OTC) file, in which you define the user configurations. After saving the file, restart the Cortex XSOAR server. The OTC file is automatically deleted.
Note
If the Cortex XSOAR server is deployed under a custom path, you also need to update the demisto.conf
file.
Create a new administrator.
As the root user, create a
/var/lib/demisto/otc.conf.json
file with content similar to the following by using thetouch
(create) andvim
(edit) commands.{ "users": [ { "username": "newadmin", "password": "veryStrongPassword!", "email": "admin@example.com", "phone": "+650-123456", "name": "New Admin Dude", "defaultAdmin": true, "roles": { "demisto": [ "Administrator" ] } } ] }
Note
The
username
needs to be a completely new user in the system. For example, if there was a usernamenewadmin
, it should be called something else, likenewadmin2
.If you do not want the new administrator to be the default administrator, remove
defaultAdmin
or change it tofalse
.Save the file.
Ensure the file has
demisto:demisto
ownership by typing the following command:chown demisto:demisto /var/lib/demisto/otc.conf.json
(Optional) If the Cortex XSOAR server is deployed under a custom path, update the
demisto.conf
file.Create a backup copy of the
demisto.conf
file.Edit the
demisto.conf
file by adding the following keys and values:"Server": { "HttpsPort": "443", "ProxyMode": true, "OneTimeConfPath": "/DATA/var/lib/demisto/otc.conf.json" },
Note
The custom path above is
/DATA/var/lib/
wheredemisto
is installed. The provided path is provided as an example.The comma after
true,
, which must be added.Note
Restart the Cortex XSOAR by running the following command:
systemctl restart demisto
The file is removed when Cortex XSOAR restarts.
Log in to Cortex XSOAR by using the new administrator credentials created in step 1.
In this example, the username is
newadmin
and the password isveryStrongPassword!
.Change the current administrator’s password.
Go to Reset P/W.
→ → , select the current administrator checkbox and clickChange the new password as required, and click Save.
Log out of Cortex XSOAR.
(Optional) Remove the new administrator you created in step 1.
Login to Cortex XSOAR using the current administrator credentials, including the new password.
Go to Remove.
→ → , select the new administrator checkbox and clickIf the new administrator is also a default administrator you can remove the user by selecting the user, clicking Roles, and unchecking the Set as Default Admin checkbox.