# Deleting a REST API User for MaxScale with MaxCtrl

## Overview

MaxScale has a [REST API](/docs/maxscale/reference/maxscale-rest-api.md), which can be configured to require authentication. When it is first installed, it has a single default admin user (admin) and password (mariadb). However, this user can be deleted, and other users can be created.

[MaxCtrl](/docs/maxscale/maxscale-management/administrative-tools-for-mariadb-maxscale-maxctrl.md) is a command-line utility that can perform administrative tasks using MaxScale's [REST API](/docs/maxscale/reference/maxscale-rest-api.md). It can be used to delete a user for the REST API.

## Deleting a User

1. [Configure the REST API](/docs/maxscale/maxscale-management/configuring-maxscales-rest-api.md) if the default configuration is not sufficient.
2. Use *MaxCtrl* to execute the [destroy user](/docs/maxscale/reference/maxscale-maxctrl.md#destroy-user) command:

```bash
$ maxctrl --secure
   --user=maxscale_rest_admin
   --password=maxscale_rest_admin_password
   --hosts=192.0.2.100:8443
   --tls-key=/certs/client-key.pem
   --tls-cert=/certs/client-cert.pem
   --tls-ca-cert=/certs/ca.pem
   destroy user "admin"
```

Replace `admin` with the actual user.

{% hint style="info" %}
MaxScale will refuse to delete the last remaining admin user.
{% endhint %}

<sub>*This page is: Copyright © 2025 MariaDB. All rights reserved.*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: 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:

```
GET https://mariadb.com/docs/maxscale/maxscale-management/administrative-tools-for-mariadb-maxscale-maxctrl/deleting-a-rest-api-user-for-maxscale-with-maxctrl.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
