Mastodon/admin/dethrone

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Mastodon‎ | admin
Revision as of 18:53, 15 January 2018 by Woozle (talk | contribs) (a necessary page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to dethrone an admin (i.e. remove their admin privileges):

Proper Method

As $mastodon_user, run the Rails console:

  • cd <mastodon_folder>
  • bundle exec rails c
  • Account.find_local('<admin_account_name>').user.update(admin: false)

I haven't used this successfully, but am told that it works.

Brute Force

Execute the following SQL on the applicable Mastodon database:

SELECT * FROM users WHERE admin;

This will get you a list of admins, from which you can get the account_id of the one you want to dethrone. Then execute this:

UPDATE users SET admin=FALSE WHERE account_id = {id to dethrone}

Links