# How to delete a ghost bot user with admin privileges?

**URL:** https://meta.discourse.org/t/topic/410144
**Category:** Support
**Created:** [August 16, 2026, 5:14am UTC](https://meta.discourse.org/t/topic/410144 "2026-08-16T05:14:25Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![AkarinLiu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akarinliu/32/539577_2.png) [@AkarinLiu](https://meta.discourse.org/u/AkarinLiu)
#### Post date: [August 16, 2026, 5:14am UTC](https://meta.discourse.org/t/topic/410144/1 "2026-08-16T05:14:25Z")

</div>

I’m facing an issue with my forum: a bot with administrator privileges cannot be deleted, which makes me worry that a hacker might one day take over my forum and exploit this ghost bot user.

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/0/d/10df08d7248f94601ddb4c7d5688833369c59ab6.webp)

---

<div class="post-metadata">

### Author: ![kddkd](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@kddkd](https://meta.discourse.org/u/kddkd)
#### Post date: [August 16, 2026, 5:24am UTC](https://meta.discourse.org/t/topic/410144/2 "2026-08-16T05:24:59Z")

</div>

If your server system has been compromised, what difference does it make whether the attacker uses the bot or directly modifies the database?

---

<div class="post-metadata">

### Author: ![kddkd](https://avatars.discourse-cdn.com/v4/letter/k/df705f/32.png) [@kddkd](https://meta.discourse.org/u/kddkd)
#### Post date: [August 16, 2026, 5:25am UTC](https://meta.discourse.org/t/topic/410144/3 "2026-08-16T05:25:52Z")

</div>

It is sufficient to ensure that your SSH account credentials remain secure and are not leaked.

---

<div class="post-metadata">

### Author: ![sk-or-v1-contents](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sk-or-v1-contents/32/547175_2.png) [@sk-or-v1-contents](https://meta.discourse.org/u/sk-or-v1-contents)
#### Post date: [August 16, 2026, 5:27am UTC](https://meta.discourse.org/t/topic/410144/4 "2026-08-16T05:27:20Z")

</div>

When did you first notice the bot being there?

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [August 16, 2026, 5:39am UTC](https://meta.discourse.org/t/topic/410144/5 "2026-08-16T05:39:10Z")

</div>

What ‘bot’ is this? Created by the #ai plugin? Discobot?

---

<div class="post-metadata">

### Author: ![AkarinLiu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akarinliu/32/539577_2.png) [@AkarinLiu](https://meta.discourse.org/u/AkarinLiu)
#### Post date: [August 16, 2026, 5:48am UTC](https://meta.discourse.org/t/topic/410144/6 "2026-08-16T05:48:50Z")

</div>

It was the previous Discourse bot, but it stopped working after the name change.

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [August 16, 2026, 5:52am UTC](https://meta.discourse.org/t/topic/410144/7 "2026-08-16T05:52:02Z")

</div>

Perhaps your `discourse_narrative_bot_enabled` setting was disabled? IIRC there was a change to new sites where Discobot will be turned off by default.

---

<div class="post-metadata">

### Author: ![AkarinLiu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akarinliu/32/539577_2.png) [@AkarinLiu](https://meta.discourse.org/u/AkarinLiu)
#### Post date: [August 16, 2026, 5:55am UTC](https://meta.discourse.org/t/topic/410144/8 "2026-08-16T05:55:25Z")

</div>

> [@NateDhaliwal](#):
>
> discourse\_narrative\_bot\_enabled

This feature is currently enabled. I also asked AI, and to revoke admin privileges, the command line must be used.  
“How to force remove a user with…” Click here to view Yuanbao’s answer

> **[阿卡林刘Chat with Yuanbao](https://yb.tencent.com/s/Pud2rCN1uQCZ)**

---

<div class="post-metadata">

### Author: ![sk-or-v1-contents](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sk-or-v1-contents/32/547175_2.png) [@sk-or-v1-contents](https://meta.discourse.org/u/sk-or-v1-contents)
#### Post date: [August 16, 2026, 6:04am UTC](https://meta.discourse.org/t/topic/410144/9 "2026-08-16T06:04:06Z")

</div>

[The user in question](https://forum.akarinliu.com/u/discourse-bot/summary) is not discobot, [discobot is this](https://forum.akarinliu.com/u/discobot/summary) instead

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [August 16, 2026, 12:16pm UTC](https://meta.discourse.org/t/topic/410144/10 "2026-08-16T12:16:58Z")

</div>

Beware that using the Rails console is an extraordinary action, and if you remove the wrong AI bot, you can break some functionality. Check this:

> [@Deleting Users in rails console](https://meta.discourse.org/t/deleting-users-in-rails-console/141540/):
>
> We are using SSO to log in users that autenticated on our main website One of our users got a message (on login) that there was an error and that she should contact an administrator. So we searched for her but could not find her profile. I did the first best thing i could imagine and “deleted” her via command line User.find\_by(email: "ex@example.com").delete which was not smart and did not really work. When she tried to login she was faced with the same error. Now her profile exist (not fin…

I think you can also remove admin privileges before deleting users from the GUI.

1. Entering into the Rails console (you want to backup just in case):

```plaintext
cd /var/discourse/
./launcher enter app
rails c

```

1. Removing the privileges:

```plaintext
u = User.find_by(username: "BOT_USERNAME")
u.revoke_admin!

```

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [August 16, 2026, 10:27pm UTC](https://meta.discourse.org/t/topic/410144/11 "2026-08-16T22:27:29Z")

</div>

You can’t delete admin users until you have demoted them. If you remove the bot’s admin rights you should be able to delete it.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 16, 2026, 11:10pm UTC](https://meta.discourse.org/t/topic/410144/12 "2026-08-16T23:10:59Z")

</div>

I think this isn’t possible for (AI)-bot users. There is no “Revoke admin” button.

It might be a little difficult to notice that in a screenshot taken on a Chinese interface, so I am adding an English one:

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/1/f/61fd7f9d8087e34b97caa5886a8c6e21620a67eb.png)

The buttons between “manage keys” and the trust level dropdown, which are shown for normal admins, are missing on bot users.

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/1/4/3141c14dc4045fe32bdd33954ba21bf0e373399e.png)

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [August 16, 2026, 11:14pm UTC](https://meta.discourse.org/t/topic/410144/13 "2026-08-16T23:14:09Z")

</div>

It’s interesting, because OP’s bot is called ‘discourse-bot’, which doesn’t bring to mind any AI bot, or I’m mistaken.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [August 16, 2026, 11:20pm UTC](https://meta.discourse.org/t/topic/410144/14 "2026-08-16T23:20:13Z")

</div>

I assumed it was a bot, because that’s the only explanation I know where those buttons you’d need to revoke admin to be able to delete the user are missing.

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [August 16, 2026, 11:21pm UTC](https://meta.discourse.org/t/topic/410144/15 "2026-08-16T23:21:00Z")

</div>

Hmm… likely a bot, but could it be from a plugin? I couldn’t find anything in core.

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [August 17, 2026, 2:14am UTC](https://meta.discourse.org/t/topic/410144/16 "2026-08-17T02:14:00Z")

</div>

The AI agent bots can be renamed, I assume it was the case for the OP.

---

<div class="post-metadata">

### Author: ![Ed\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_s/32/134015_2.png) [@Ed\_S](https://meta.discourse.org/u/Ed_S)
#### Post date: [August 17, 2026, 5:37am UTC](https://meta.discourse.org/t/topic/410144/17 "2026-08-17T05:37:14Z")

</div>

It’s an admin-level account which isn’t listed in the about.json, so my guess would be that makes it a bot.

---

<div class="post-metadata">

### Author: ![AkarinLiu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akarinliu/32/539577_2.png) [@AkarinLiu](https://meta.discourse.org/u/AkarinLiu)
#### Post date: [August 25, 2026, 5:25am UTC](https://meta.discourse.org/t/topic/410144/18 "2026-08-25T05:25:04Z")

</div>

The issue is resolved! Thank you! @satonotdead

---

<div class="post-metadata">

### Author: ![AkarinLiu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akarinliu/32/539577_2.png) [@AkarinLiu](https://meta.discourse.org/u/AkarinLiu)
#### Post date: [August 25, 2026, 5:25am UTC](https://meta.discourse.org/t/topic/410144/19 "2026-08-25T05:25:41Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/f/6/6/f662636d8a8846dcbd2101cae6e802b80e4752d6.webp)
