Archive for September, 2006

Joomla Install Booboo and Recovering Joomla Password

Friday, September 22nd, 2006

Joomla installation is very easy. 

The snazzy installer takes you through the steps of filling in the database details, site names etc and will create a configuration if the folder is writable.  If your configuration file isn’t writable Step 4 of the Joomla installation gives you the completed configuration details to copy and paste into notepad, which you can then save as configuration.php and manually upload to the root folder of your joomla installation.  A piece of cake! (It goes so smoothly I suspect it’s chocolate cake…mmm chocolate cake! Oh darn, there go the diet pangs again! :?)

The only problem I have with it is that when I’m copying the config file details from that screen it’s easy to miss the other vital information that it’s giving me – my password!  I don’t know how many times I’ve done the same thing. I go to log in to a new Joomla installation only to realize that I forgot to note down the password!   Joomla’s installation instructions tell you that should you lose the password you need to start the installation process over again, and by that time I’ve usually deleted the installation folder from the server, so it’s quicker for me to reset the password in the database. 

The instructions are very simple (and similar to resetting the password for WordPress, vBulletin or Drupal except the table/field names are different).  To make these changes I'm going to assume that you have access to phpMyAdmin and are comfortable using it. (Making a wrong change here can trash your entire database!  Read the instructions through before you consider making any edits. You have been warned! )

  1. Log into phpMyAdmin Joomla (usually found in your cpanel).
  2. Click on the Databases link and then click on the database you want to edit from the list that appears.
  3. You will now be faced with a list of tables in that database.  From this point on I'm assuming that you used the default "jos_" prefix for your Joomla tables.
  4. In the right-hand pane scroll down to "jos_users" and click on the "Browse" icon (if you hover over the icons you'll notice a tooltip appear).
    Joomla users table in phpMyAdmin
  5. You'll now see the list of users for the site.  If like me you’ve just installed you will only have one user, a SuperAdministrator with the username of admin.   (If not you’ll need to locate the appropriate user for the one you want to change.) Click on the "Edit" icon next to this to edit it (again, hover long enough and you'll see a tooltip appear).
    Joomla users table in phpMyAdmin
  6. You'll now see all the details associated with the Admin user.  The field that you are interested in is labeled "password".  This field contains the password that have been encoded using the MD5 one-way hash which turns the password that was used into a string that is 32 alphanumeric characters long.  Don't bother trying to reverse the hash back to the password!  Consider the password lost!
  7. Into the "password" field, type in your new password. 
    (REMEMBER THIS PASSWORD!!! )
  8. Now your new password will be not stored in the database as the plain text password you just typed in (which would make it easy to steal) but rather as an MD5 hash of the password. So the next important step is to convert your password.  Fortunately, phpMyAdmin offers a really easy way to do this.  
    From the "Function" field select "MD5".
    Enter new Joomla password with MD5 hash function in phpMyAdmin
  9. Once you've made that change, scroll to the bottom of the screen and click "Go".  The password will be hashed using MD5 and stored in the database.
  10. Log out of phpMyAdmin.
  11. Now you can log into Joomla Administrator using the new password!

The big question is next time I do a Joomla installation will I make the same mistake again?  Any bets??

%d bloggers like this: