vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Admin permissions via db? (https://vborg.vbsupport.ru/showthread.php?t=124953)

GrendelKhan{TSU 08-26-2006 03:24 AM

Admin permissions via db?
 
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_v...lies/frown.gif
HELP!!

afullcup 08-26-2006 03:32 AM

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 08-26-2006 03:37 AM

nope. :( I can look at it via phpmyAdmin...

but no idea what to do from there. :/

afullcup 08-26-2006 03:44 AM

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:

SELECT usergroupid, title FROM usergroup
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:

SELECT usergroupid, userid FROM user WHERE username = 'you'
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:

UPDATE user SET usergroupid = 1 where username = 'you'
then check to see if that fixed your problem or not.... sure hope it does :)

Adrian Schneider 08-26-2006 03:58 AM

Code:

update user
set usergroupid = 6
where userid = X

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

baronvonwalz 08-26-2006 04:00 AM

Agreed.

GrendelKhan{TSU 08-26-2006 04:14 AM

thanks! ..

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

afullcup 08-26-2006 04:15 AM

Quote:

Originally Posted by SirAdrian
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:

        //      ****** UNDELETABLE / UNALTERABLE USERS ******
        //      The users specified here will not be deletable or alterable from the control panel by any users.
        //      To specify more than one user, separate userids with commas.
$config['SpecialUsers']['undeletableusers'] = '1,2';

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 08-26-2006 04:16 AM

Quote:

Originally Posted by SirAdrian
Code:

update user
set usergroupid = 6
where userid = X

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:

Quote:

Originally Posted by afullcup
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:

SELECT usergroupid, title FROM usergroup
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:

SELECT usergroupid, userid FROM user WHERE username = 'you'
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:

UPDATE user SET usergroupid = 1 where username = 'you'
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


All times are GMT. The time now is 06:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01125 seconds
  • Memory Usage 1,738KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete