How to Recover or Reset Your Admin Password

Normally, you can add, edit and delete users and passwords from the back-end User Manager. To do this, you must be logged in as a member of the Super Administrator group. However, if you're unable to login to the back-end administrator as the Super Administrator, you may need to reset the password to gain access to your site. If you have forgotten the password or the person who knew the passwords is no longer available, you can use one of the methods below to recover or reset your Super Administrator password.

 

Use the Lost Password Feature

If you have access to the email address that was used for the admin user you may be able to recover the password using the "lost password" feature on the front end. If you don't have a login module or link published on your site, you can append index.php?option=com_user&view=login to your domain name (ie, www.yourdomain.com/index.php?option=com_user&view=login) to get to the login screen. Click the "forgot password" or other "login reminder" link and enter the email address. The site will send an e-mail to the user's e-mail address and allow you to change the password.

If this method will not work, you have two other options, both of which require working with the MySQL database directly.

Change the Password in the Database

If the admin user exists, you can change the password in the mysql database to a known value. You can use phpMyAdmin or other database management tool to do this.

  1. Navigate to phpMyAdmin and select your Joomla! database in the left-hand drop-down list box.
  2. On the left side of the screen, click on the table "jos_users" in the list of tables. Your database may have a different prefix than "jos". If so, find the "PREFIX_users" table.
  3. Click on the "Browse" button in the top toolbar to see a list of all of the users.
  4. Find the user whose password you want to change and press the Edit icon for this row.
  5. Copy and paste a known MD5 hash into the password field -- for example:
    admin = 21232f297a57a5a743894a0e4a801fc3
    secret = 5ebe2294ecd0e0f08eab7690d2a6ee69
    OU812 = 7441de5382cf4fecbaa9a8c538e76783
    You must paste the password's hash value, not the password itself. You can use one of the above passwords or use an MD5 tool to create a password. So, to change the password to "admin" you would paste "21232f297a57a5a743894a0e4a801fc3" (without the quotes) into the password field. Press the "GO" button and you should see a message showing "Affected rows: 1".
  6. You should now be able to log into your back-end administration. Once logged in, you should change the password to a secure value that only you know. You should make sure that the password is complex and not easily guessed. A handy tool for creating complex passwords is available the PC Tools Password Generator.

The above is generally the easiest method for people who are not comfortable with SQL commands. However, my preferred method is to use a sql command in lieu of steps 3-6 above:

  1. Navigate to phpMyAdmin and select your Joomla! database in the left-hand drop-down list box.
  2. On the left side of the screen, click on the table "jos_users" in the list of tables. Your database may have a different prefix than "jos". If so, find the "PREFIX_users" table.
  3. Click on the "SQL" tab at the top of the screen and delete the "SELECT * FROM `jos_users` WHERE 1" from the box. Enter the following command to update your password:
    UPDATE `jos_users` SET `password` = MD5( 'new password' ) WHERE `jos_users`.`username` = "admin";

    In the above command, replace "new password" with your selected password.
  4. You should now be able to log into your Joomla admin.