PDA

View Full Version : Admin permissions via db?


GrendelKhan{TSU
26 Aug 2006, 05:24
one of my well-intentioned but poorly executed admins messed up everyone's admin status and messed up some configurations and opened up our private area. no, we weren't hacked. lol.

now I'm a moderator status access only and can't get into admin to fix things. I can access our host, ftp and db... .I just don't know what to do about once I do.

How I do change my admin status via the db or files ?

I'm sure there is a way, but I'm not a programmer so... http://images.vbulletin.com/images_vb3/smilies/frown.gif
HELP!!

afullcup
26 Aug 2006, 05:32
Looking at my database, I can tell you some things I would try to do, but I don't know if I'd be going about it in the correct way or not...

Are you familiar with getting around your database? queries and such?

GrendelKhan{TSU
26 Aug 2006, 05:37
nope. :( I can look at it via phpmyAdmin...

but no idea what to do from there. :/

afullcup
26 Aug 2006, 05:44
ok... I'll do my best to help in case noone else gets to you tonight...

in phpmyadmin, get to an SQL tab so that you can enter a query and type this:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



then hit Go - that will give you a list of the usergroups and you should find the Administrator group in the list. Get the usergroupid of Administrator and Moderator.

then, run another query (change the 'you' in the query to YOUR username):



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



that will tell you what usergroup you are currently in. If it shows you as a moderator, then to update it to Administrator, run this query (be sure to change the 1 to the Administrator usergroupid you found in the first query):



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



then check to see if that fixed your problem or not.... sure hope it does :)

SirAdrian
26 Aug 2006, 05:58
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Be sure to add yourself to the untouchable admins thinger in config.php from now on to prevent this from happening.

baronvonwalz
26 Aug 2006, 06:00
Agreed.

GrendelKhan{TSU
26 Aug 2006, 06:14
thanks! ..

<< goes to try and proceeds with cautioun. :/

afullcup
26 Aug 2006, 06:15
Be sure to add yourself to the untouchable admins thinger in config.php from now on to prevent this from happening.

since you said you are not a coder, thought I'd explain just how to do that...

in your config.php file (which for me is in my includes directory) look for the following:


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



if you don't have that last line in there, add it and make sure your userid is in the list (in this case 1 and 2 are both in the list).

hth

GrendelKhan{TSU
26 Aug 2006, 06:16
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Be sure to add yourself to the untouchable admins thinger in config.php from now on to prevent this from happening.

good point. funny thing is.. I thought I did. hmmm...

man heads are gunna roll!! :mad: :dead: :pirate:

ok... I'll do my best to help in case noone else gets to you tonight...

in phpmyadmin, get to an SQL tab so that you can enter a query and type this:



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



then hit Go - that will give you a list of the usergroups and you should find the Administrator group in the list. Get the usergroupid of Administrator and Moderator.

then, run another query (change the 'you' in the query to YOUR username):



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



that will tell you what usergroup you are currently in. If it shows you as a moderator, then to update it to Administrator, run this query (be sure to change the 1 to the Administrator usergroupid you found in the first query):



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



then check to see if that fixed your problem or not.... sure hope it does :)

awesome!! that did it!! THANK YOU!! you are a god among men!! :D :D