Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 08-26-2006, 03:24 AM
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
Location: Boston | Seoul, S. Korea
Posts: 1,311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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...
HELP!!
Reply With Quote
  #2  
Old 08-26-2006, 03:32 AM
afullcup afullcup is offline
 
Join Date: Jul 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #3  
Old 08-26-2006, 03:37 AM
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
Location: Boston | Seoul, S. Korea
Posts: 1,311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

but no idea what to do from there. :/
Reply With Quote
  #4  
Old 08-26-2006, 03:44 AM
afullcup afullcup is offline
 
Join Date: Jul 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 08-26-2006, 03:58 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 08-26-2006, 04:00 AM
baronvonwalz baronvonwalz is offline
 
Join Date: Apr 2005
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Agreed.
Reply With Quote
  #7  
Old 08-26-2006, 04:14 AM
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
Location: Boston | Seoul, S. Korea
Posts: 1,311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks! ..

<< goes to try and proceeds with cautioun. :/
Reply With Quote
  #8  
Old 08-26-2006, 04:15 AM
afullcup afullcup is offline
 
Join Date: Jul 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 08-26-2006, 04:16 AM
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
Location: Boston | Seoul, S. Korea
Posts: 1,311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!! :dead: irate:

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!!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:37 PM.


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.04729 seconds
  • Memory Usage 2,246KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (9)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete