You lost the administrator password, or deleted the admin account

3.9.17. You lost the administrator password, or deleted the admin account

Figure 3-35. Administration panel: Edit Admins.

Administration panel: Edit Admins.



You did a Very Big Mistake - you erased your PHP-Nuke Super Admin! Now you cannot do anything on your website! Your powers are those of a normal member... How do you get your Admin back?

You can try one of the following two solutions (see I deleted my Super Admin. How do I get him back?):

  1. You can use phpMyAdmin (or a similar DB administration package, see Section 3.3) and look in (the technical term on the link is "browse") the nuke_authors table. You can take two approaches:

    1. See if your admin is still there, and you can set a new password (you'll have to choose "MD5" from the dropdown menu on the pass field, see Figure 3-36). If your admin is not there, then just add a new row to the table and put in the missing info.

    2. Or you can just delete the line with the administrator name and point your browser to the admin.php file - you will then be prompted to enter a new admin name and password. You may enter whatever new values you like there, but you should not create a user with the same name, even if prompted to.

  2. Using phpMyAdmin (or directly in MySQL), go to the nuke_authors table and make your password dc647eb65e6711e155375218212b3964 - that will make it Password, then just login and change it. Here we make use of the fact that the MD5 hash of the word "Password" is dc647eb65e6711e155375218212b3964.

Figure 3-36. phpMyAdmin: field functions.

phpMyAdmin: field functions.



Tip How to compute the MD5 hash of an arbitrary password using only PHP and your browser
 

If you are curious about the MD5 hash of a certain password, but do not have easy access to a function that computes it, you can make use of the fact that the PHP interpreter of your web server can compute is for you. Substitute XXXX for the password whose MD5 hash you want to compute in the following script:

<?php
$pass="XXXX";
$new_password = md5($pass);
print("MD5 hash of $pass = $new_password");
?>

and upload it somewhere on your web server. Then point your browser to it and you should see the answer. You can use it to change the password field of the nuke_authors table directly in MySQL.

See Admin Password - i've lost it, Password help for discussions.


Help us make a better PHP-Nuke HOWTO!

Want to contribute to this HOWTO? Have a suggestion or a solution to a problem that was not treated here? Post your comments on my PHP-Nuke Forum!

Chris Karakas, Maintainer PHP-Nuke HOWTO

 

Site Info v2.2.2

Last SeenLast Seen
Server TrafficServer Traffic
  • Total: 342,470,787
  • Today: 3,950
Server InfoServer Info
  • Nov 23, 2017
  • 01:23 am PST
 
 

Daily Inspiration