> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/users-and-roles/change-the-administrator-password.md).

# Change the Administrator Password

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.

{% hint style="info" %}

### Note

If the Cortex XSOAR server is deployed under a custom path, you also need to update the `demisto.conf` file.
{% endhint %}

1. Create a new administrator.
   1. As the root user, create a **`/var/lib/demisto/otc.conf.json`** file with content similar to the following by using the **`touch`** (create) and **`vim`** (edit) commands.

      ```programlisting
      {
          "users": [
              {
                  "username": "newadmin",
                  "password": "veryStrongPassword!",
                  "email": "admin@example.com",
                  "phone": "+650-123456",
                  "name": "New Admin Dude",
                  "defaultAdmin": true,
                  "roles": {
                      "demisto": [
                          "Administrator"
                      ]
                  }
              }
          ]
      }
      ```

      <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><h3>Note</h3><p>The <code>username</code> needs to be a completely new user in the system. For example, if there was a username <code>newadmin</code>, it should be called something else, like <code>newadmin2</code>.</p></div>

      If you do not want the new administrator to be the default administrator, remove **`defaultAdmin`** or change it to **`false`**.
   2. Save the file.
   3. Ensure the file has **`demisto:demisto`** ownership by typing the following command:

      **`chown demisto:demisto /var/lib/demisto/otc.conf.json`**
2. (Optional) If the Cortex XSOAR server is deployed under a custom path, update the `demisto.conf` file.
   1. Create a backup copy of the `demisto.conf` file.
   2. Edit the `demisto.conf` file by adding the following keys and values:

      ```programlisting
      "Server": {
      "HttpsPort": "443",
      "ProxyMode": true,
      "OneTimeConfPath": "/DATA/var/lib/demisto/otc.conf.json"
      },
      ```

      <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><h3>Note</h3><p>The custom path above is <code>/DATA/var/lib/</code> where <code>demisto</code> is installed. The provided path is provided as an example.</p><p>The comma after <code>true,</code>, which must be added.</p></div>
3. Restart the Cortex XSOAR by running the following command:

   `systemctl restart demisto`

   The file is removed when Cortex XSOAR restarts.
4. 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 is **`veryStrongPassword!`**.
5. Change the current administrator’s password.
   1. Go to Settings → USERS AND ROLES → **Users**, select the current administrator checkbox and click **Reset P/W**.
   2. Change the new password as required, and click **Save**.
   3. Log out of Cortex XSOAR.
6. (Optional) Remove the new administrator you created in step 1.
   1. Login to Cortex XSOAR using the current administrator credentials, including the new password.
   2. Go to Settings → USERS AND ROLES → **Users**, select the new administrator checkbox and click **Remove**.

      If 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-6-administrator-guide/6.14/onboard-cortex-xsoar/users-and-roles/change-the-administrator-password.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
