Difference between revisions of "software/Mastodon/admin/dethrone"
Jump to navigation
Jump to search
(a necessary page) |
m (Woozle moved page Mastodon/admin/dethrone to software/Mastodon/admin/dethrone: disambiguate from band (eventually)) |
(No difference)
|
Latest revision as of 19:12, 12 March 2025
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
- 2017-09-07 How to revert a users admin status?: the proper method is explained, but some important details aren't included