I accidentally lost my admin account! What can I do%3F From Online Manual

Jump to: navigation, search

If you accidentally delete your administrator account, you will need to register again and run the appropriate query for your SMF version.

If you lose your administrator membergroup and privileges due to a mistake or conversion, you will need to run the appropriate query for your SMF version, but you do not have to register your account again.

Setting a new user account up to be admin

The below queries will add you back as an administrator on an SMF forum. Don't forget to replace smf_ with your database prefix. These queries can be run from within phpMyAdmin, or, if you do not have phpMyAdmin installed, from a simple single-purpose script.

SMF 1.1

Run this query:

UPDATE smf_members SET ID_GROUP = '1' WHERE memberName = 'adminsusername'

SMF 2.0

Run this query:

UPDATE smf_members SET id_group = '1' WHERE member_name = 'adminsusername'

In addition, SMF 2.0 allows you to re-attribute posts through the Forum Maintenance section of your Administration Center (Administration Center > Forum Maintenance > Reattribute User Posts). You just need to fill in the form using the e-mail address or username of the old user account, and the username for the user who is to have those posts. This only works for guest posts (remaining posts from deleted members are considered guest posts).

But I need admin to activate the new account before I can log in

Solution: turn off account activation altogether. In phpMyAdmin, or in a single-purpose script, run the appropriate query for your version of SMF. Afterwards, be sure to set account activation back the way you want it.

SMF 1.1

UPDATE smf_members SET is_activated = 1 WHERE memberName = 'yourusername';

SMF 2.0

UPDATE smf_members SET is_activated = 1 WHERE member_name = 'yourusername';

But I forgot my password and I cannot create a new account

In phpMyAdmin, or in a single-purpose script, run this query:

UPDATE {$db_prefix}_settings SET value = 0 WHERE variable = 'registration_method';

Afterwards, be sure to set the registration method the way you want it.

I need to create a new account for admin, but my forum is in maintenance mode

For more information about setting the value of $maintenance in your Settings.php file, see $maintenance



Advertisement: