News:

Join the Facebook Fan Page.

Main Menu

Administrator Cant Login

Started by rhodeder, December 29, 2007, 03:07:25 AM

Previous topic - Next topic

rhodeder

Hey i just went on my forum today and i cant login. Im the main administrator on the forums and need to manage it. I tried password recovery and everything and seeing if i could even create a username under what it used to be and nothing i just get it all ready exists. Do you have any suggestions of a quick fix for this?

-Derek

JMV290

Do you have phpMyAdmin access?  If you do, create a new forum account, log in and change the  ID_GROUP of that member to 1 to make them an administrator.  Use that account to change your login info and such, then just delete the extra admin account.

Tony Reid

password recovery? do you mean forgot password? if not then try using the forgot password link to email you a new password.
Tony Reid

greyknight17

If you still can't reset the password by using the forgot password link, try using phpMyAdmin as said earlier. Register with a new account...this will be your temp admin account (see below for more instructions).

Go into phpMyAdmin and click on your database. Then click on the SQL tab and copy paste the following code and run it:

Lost admin account access or deleted by mistake. Run the below query to gain admin rights:

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

Replace yourusername with the new account you just registered with

SssS

I'm also facing the problem of couldn't log in as an admin (after I changed my login name). I tried the 'forgot password' link but it doesn't work as I didn't receive any mail regarding the password.

I tried the way as mentioned above but this is what I got while running the code at SQL:

#1146 - Table 'wenchuan_wenchuan.smf1_members' doesn't exist


What may be the problem?

Tony Reid

Create this php file call it  adminfix.php and drop it in your forum directory (where SSI.php is located)

Change yourusername variable in the sql statement to your new account that you wish to become an administrator.

The run it from www.yourdomain.com/forum/adminfix.php



<?php
include_once('SSI.php');
global 
$db_prefix;

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

?>


Then after you have used it - DELETE IT!!!
Tony Reid

SssS

Quote from: Tony on January 13, 2008, 05:03:08 AM
Create this php file call it  adminfix.php and drop it in your forum directory (where SSI.php is located)

Change yourusername variable in the sql statement to your new account that you wish to become an administrator.

The run it from www.yourdomain.com/forum/adminfix.php [nofollow]



<?php
include_once('SSI.php');
global 
$db_prefix;

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

?>


Then after you have used it - DELETE IT!!!

Sorry to ask a noob question, but how should I create a php file?

Tony Reid

a php file is just a plain text file... you can use any text editor to create them - although  would avoid windows notepad.... a lot of guys use conTeXT http://www.context.cx/

Tony Reid

SssS

Alright, it works!

Thanks a lot for your help!

Just wonder, y wouldn't it work while I tried to do it at phpMyAdmin?

Tony Reid

Glad it worked out ;)

I think it failed before because of your db prefix.

Dont forget to delete the file!!! its a security risk.

Tony Reid

SssS

Quote from: Tony on January 13, 2008, 05:42:31 AM
Glad it worked out ;)

I think it failed before because of your db prefix.

Dont forget to delete the file!!! its a security risk.

but I've insert int he right prefix.
Thanks for the reminder, I've deleted it.



greyknight17

Did you try this:

UPDATE wenchuan_wenchuan.smf1_members SET ID_GROUP = '1' WHERE memberName = 'yourusername';

Nice code Tony. Stealing it now ;)

Topic marked as solved.

greyknight17

Did you move hosts? It looks like a new forum setup there. Try this:

Use repair_settings.php and make sure that the database information is correct. Then click on the Recommended values. Save the changes. That should restore your forum back to working order. Delete the repair_settings.php file once you are done.

If you didn't move your webhost, do you know if your host has upgraded anything on their end? There have been users who are reporting similar issues because of a PHP upgrade by their hosts. Ask your host to see if they know SMF 1.1.4 (give them the version also) will work.

Tony Reid

And even though your having probs - I'd recommend removing the admin username/password from your post.
Tony Reid

greyknight17

Done...edited the post ;)

afghan123: Two things.....

1. Don't post duplicate topics and posts like that. They have all been deleted and I should really delete your post here as well since you already have a topic started which already have replies to them as well.

2. Continued from the above....since you have a topic posted already, you should followup on it instead of hijacking another user's topic which was already marked as solved.

Advertisement: