SMF Online Manual

*
  • Home
  • Community
  • Download
  • Customize
    • Modifications
    • Themes
    • Upgrades
  • Support
    • Function Database
  • Online Manual
  • About
  • Contribute
  • Development
 

Documentation of the moment:

Now announcing the SMF wiki (beta)


  • Home
  • Help
  • Search
  • Login
  • Register

  • SMF Online Manual »
  • Glossary »
  • FAQs »
  • Administration Questions  »
  • Topic: I lost admin account, what can I do?
 
Install SMF Installing Upgrading Converting
Using SMF User Moderator Administrator
Advanced Mods and Themes More Info
Glossary Terminology FAQs References Feature List What's New
Comments Feedback Requests

Updated Documentation: The Online Manual has moved. All updates to the documentation are now taking place in the new Online Manual. Please see the new Online Manual, and learn how you can help, as it continues to grow and improve.

Updated content on Wiki: This documentation is outdated, please refer to the wiki article for more up to date information.

« previous next »
I lost admin account, what can I do?
If you deleted your Administrator account, you will need to register again and run the appropriate query for your SMF version.
If you lost your Administrator membergroup and privileges due to a mistake or conversion, you will need to run the appropriate query for your SMF version.

The below queries will add you back as an Administrator on an SMF forum.
[vers=1.1]
Run this query in phpMyAdmin:
Code: [Select]
UPDATE smf_members SET ID_GROUP = '1' WHERE memberName = 'yourusername'[/vers]

[vers=2]
Run this query in phpMyAdmin phpMyAdmin:
Code: [Select]
UPDATE smf_members SET id_group = '1' WHERE member_name = 'yourusername'
Alternatively, SMF 2.0 allows you to reattribute posts through the Forum Maintenance section of your Administration Center (Administration Center > Forum Maintenance > Reattribute User Posts). Simply fill in the form using the email or username of the old user, 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).
[/vers]
Print
Reply
Reply with quote



Comments:
[n3rve] made the following comment on August 26, 2008, 01:10:40 PM:

If you do not have access to phpMyAdmin, the following instructions would help, This applies to SMF 1.1.x only:
Create a new .php file, copy and paste the fol. code in it, replace the "yourusername" variable with the new account's login name.


Code: [Select]
<?php
//Here we include SSI for globals used within the sql statement
include_once('SSI.php');
global 
$db_prefix;

$adminsquirt = db_query("UPDATE {$db_prefix}members 
SET ID_GROUP = '1' WHERE memberName = 'yourusername'"
,__FILE__, __LINE__);

?>


Save the PHP file, upload it to your board directory (where SMF files reside on the server), and access it via URL.

-[n3rve]

advicesisters made the following comment on December 09, 2008, 08:13:34 AM:

I just read this post and I have deleted myself as adminstrator, but I am not really familiar with simple machines and do not understand any of what is written here....can someone break it down in steps in plain English for those of us who simply do not know what or where to look for these things?

Jade made the following comment on December 09, 2008, 08:47:27 AM:

Depending on your version you need to follow one of the boxes.

Both versions are labled, and each one has a link which explains phpmyadmin.

All you need to change from that query is "yourusername" to your username :)

medrison made the following comment on December 23, 2008, 04:22:28 PM:

Can you be more detailed about it?
Registering again? How? The admin that supposed to approve the registration is gone.
On what databased or where am I suppose to run the query?in my master "Databases" account or" _smf1(41)"?

I did as i thought I should and when I try to log on I got the message saying that the account is still awaiting activation.



Thank you,
Mike

Jade made the following comment on December 25, 2008, 01:48:48 PM:

The database you run this query on is the database the forum uses, check your settings.php file if you are unsure. If you didnt delete your account, you don't need to re-register :).

As for activating the account, use these:

SMF 1.1:

Code: [Select]
UPDATE smf_members SET is_activated = 1 WHERE memberName = 'yourusername';
SMF 2.0:
Code: [Select]
UPDATE smf_members SET is_activated = 1 WHERE member_name = 'yourusername';

Silkweaver made the following comment on March 26, 2009, 07:06:48 AM:

I am unable to access my Admin account.  The user exists but the password I had recorded (obviously incorrectly!) does not work.  The password retrival system does not send an email and there is no security question.  New registrations are disabled.   Any suggestions?

B made the following comment on March 26, 2009, 01:58:13 PM:

Try running the following query.

Code: (SMF 1.1 & 2.0) [Select]
UPDATE {$db_prefix}_settings SET value = 0 WHERE variable = 'registration_method';

Where {$db_prefix} is the prefix you set on installation. That should reopen registration. Then, you can follow the steps in this document for having deleted the administrator account.

B

Silkweaver made the following comment on March 27, 2009, 11:32:44 AM:

Worked a charm, many thanks!

lavide made the following comment on August 13, 2009, 09:57:40 PM:


Quote
All you need to change from that query is "yourusername" to your username :)

My user name on my host or my username in SMF forums?

B made the following comment on August 14, 2009, 02:30:25 AM:

Your SMF username. :)

B

Darrel Christenson made the following comment on September 01, 2009, 03:14:55 PM:

I have run the 1.x query repeatedly - it DOES NOT WORK, the account specified in yourusername does not re-acquire admin privileges.
 
Does any one know how to correctly make an account be admin???
 
Help.
 
 
drc  :)
 

B made the following comment on November 03, 2009, 02:53:51 PM:

Quote from: Darrel Christenson on September 01, 2009, 03:14:55 PM
I have run the 1.x query repeatedly - it DOES NOT WORK, the account specified in yourusername does not re-acquire admin privileges.

Please, remember that it's asking for your SMF username (what you use to login), not your display name.

B

briandoc made the following comment on March 19, 2010, 09:53:46 AM:

Thanks, the steps worked great for my 1.1.8 install. Personally I think the code should have stopped me from deleting my own account and especially since I was the only Administrator of the board. I have since upgraded to 1.1.11, maybe it handles this situation a bit smarter. My board had gone rogue (since it was just a test board and I hadn't checked it in forever) and was filled with SPAM/spammers, so I was mass deleting all the SPAM user accounts when I blindly selected my own account too... anyways, thanks for the help, was simple and worked great!


Advertisement:
  • SMF 2.0.1 | SMF © 2011, Simple Machines
  • XHTML
  • WAP2

Page created in 0.089 seconds with 21 queries.
Page served by: 10.0.100.111