#25 - Forgot your super administrator password?
|By David Attard|
#25 - Forgot your Joomla super administrator password?
This happened to me quite a few times before I learnt to store my passwords in a safe place. However, if you do forget or lose your Joomla super administrator password, there is a very easy way to reset it to a default password (admin). Use the steps below to set a new password.
Forgot Joomla 2.5 / 3.x password? - how to change it via phpmyadmin
Access phpmyadmin using the database administrator and password which you should have available as part of your web hosting details
Access the Users Table in phpMyAdmin
Change the Super Administrator Password
See the screenshot below of how your xxxx_users table should look like. Then press Go.
After that your password is changed. You will see on the next screen that the password field changed to a bunch of letters and numbers that you didn’t enter. That’s ok, because that’s how MySQL stores your password.
Go to your Joomla 2.5 Administrator screen and try out your new username and password you entered.
To reset the old password:
If the admin user is still defined, the simplest option is to change the password in the database to a known value. This requires that you have access to the MySQL database using phpMyAdmin.
To create a new admin2 user:
Open the database using phpMyAdmin or database explorer and select the table, jos_users . (replace jos_ with your own table prefix if this is different than the default).
Run the following SQL Code:
INSERT INTO `jos_users`(`id`, `name`, `username`, `email`, `password`, `usertype`, `block`, `sendEmail`,`registerDate`, `lastvisitDate`,`activation`,`params`)
VALUES ('40', 'Administrator2', 'admin2', 'email@example.com','d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199','Super Administrator', 0, 1, '0000-00-00 00:00:00', '0000-00-00 00:00:00',"","");
INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`) VALUES (40, 8);
Logon to the back end http://yoursitedomain.com/administrator using the username admin2 and the password secret in the login box.
2. Select the record for the administrator account - by default this is user 62.
3. Copy and paste the MD5 # below and save the changes
You need access to your MySQL database, via phpmyadmin or otherwise. For Joomla version up to 1.0.12 you need to execute the following query. The strange password is actually the password "admin" encrypted with the encyption algorithm Joomla uses.
UPDATE `jos_users` SET `name` = 'admin', `password` = '21232f297a57a5a743894a0e4a801fc3' WHERE `id` =62 LIMIT 1 ;
For 1.0.13, you need to run a query with a different value for the password, which is below because the encryption algorithm has changed.
UPDATE `jos_users` SET `name` = 'admin', `password` = 'af9083d4b82dbc0745b124db3b3cf15d:M0WuLowO4rtRTddG' WHERE `id` =62 LIMIT 1 ;
Once you've run this query you need to logon to the administrator backed and set the password to something more complicated. Leaving the password as "admin" will result in a serious risk to your site!
If you're running an older version of Joomla or Mambo, you might need to change jos_users to mos_users.