Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Emergency tutorial if you delete yourself
#1
This tutorial is incase you accidentally delete yourself from the admin staff, and there are no other staff.

1: Do NOT! log out off your session. if you already have, you will have to re-install THT. You will notice that the name displayed at the to right will be "". This is okay.
You should be getting weird errors at the top of every page saying something like: "staff id['1'] not found", just ignore these.

2: Open up your file manager and navigate to /yourthtdirectory/admin/index.php

3: in index.php, find:
PHP Code:
elseif(!$main->checkPerms($page['id']) && $db->num_rows($query) != 0) {
        
$html "You don't have access to this page.";    
    } 
and replace it with:
PHP Code:
    /* elseif(!$main->checkPerms($page['id']) && $db->num_rows($query) != 0) {
        $html = "You don't have access to this page.";    
    }
    */ 
4: go back to your logged in null admin account and go to the "add staff" page. Re-Create your staff account.

5: log out of your null account and log back in with your regular account. Viola! Everything is back to normal.

6: IMPORTANT! go back to the index page in step 3 and change it back to normal. If you don't do this, you will have a major security flaw.

*Please note that this is a last resort and SHOULD NOT be attempted if you don't know what you are doing. If this is done wrong, it will mess up you tht installation and you will have to re-install THT. Re-installing THT is the recommended solution if you accidentally delete your last admin account.
Nick - TheHostingTool Staff Coordinator

[Image: standard.png]

Reply
#2
Or you could just make a new admin in your mysqldatabase.
Or you could use a database backup (if you have one)
Reply
#3
alfaleader, via phpMyAdmin is not really possible. Salt and Password needs to be md5'ed manually. A bit... Hard for newbies. The way that TheRaptor made is good, but it compromises security.
Jimmie Lin - Community Manager & THT.Next Developer
Reply
#4
... but is it possible?
Reply
#5
alfaleader, didn't test TheRaptor's method myself. But it is possible, I think.
The PHPMyAdmin way is also possible, but you will have to salt and md5 the password yourself.
Jimmie Lin - Community Manager & THT.Next Developer
Reply
#6
Yes, my way is possible, I would not have posted it if it wasn't.
If you know how to salt and m5d passwords yourself, you don't need to be reading this.
Nick - TheHostingTool Staff Coordinator

[Image: standard.png]

Reply
#7
Yes I know that your way is possible (you hacked THT :p ).
Reply
#8
yeah, I hackz THT (someone has to)
Nick - TheHostingTool Staff Coordinator

[Image: standard.png]

Reply
#9
Hey, I have an awesome tht password and salt gen. I'll upload it here if you want. I'm not really sure if it works though. It should. Tongue
Kevin Mark - TheHostingTool Lead Developer
Reply
#10
Upload it Kevin. Will be a great help.
Jimmie Lin - Community Manager & THT.Next Developer
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)