Jesin's Blog

Welcome to the Portal of Technology

  • Facebook
  • GitHub
  • Google+
  • RSS
  • Twitter
  • Home
  • Categories
    • Domains
    • Linux
    • Networking
    • PHP
    • Virtualization
    • Web Design
    • Web Servers
    • Windows
  • WordPress Plugins
    • Custom Error Pages
    • HTTP Digest Authentication
    • Mailgun Email Validator
  • Toolbox
    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool
  • About Me
  • Contact Me
  • Sitemap
Home ›
PHP ›
How to reset the Joomla Administrator password

How to reset the Joomla Administrator password

September 16, 2010 PHP Jesin A Leave a Comment

php category thumbnail

A decade ago we were worrying about where we kept our car/house/company keys and as our wealth grew we had to manage more number of keys. Come back to the current world world we live now and the situation doesn’t get any better, the only difference is we need to manage our key to our online world aka the password. From emails to bank accounts, forums to social networking websites we have a whole paragraph of  passwords and the situation worsens when you become a web designer/webmaster. A password for your web hosting account, one for the domain control panel another for your CMS and the list goes on. So it won’t take a long time before you click on that “Forgot Password” button.

Alright enough of storytelling lets get to business. So you’ve forgotten your joomla administrator password and you can’t find that much needed “Forgot Password” link on the joomla administrator login. Now what do you do, read this article further.

Where are joomla’s user credentials stored ?

All the top secret information related to all users (both back-end and front-end) are safely stored in your joomla database inside a table named as jos_users (replace jos_ with your database prefix). This is what we need to modify.

Method 1:- Using phpmyadmin

Using phpmyadmin will make your job much easier. Open your web hosting control panel and under the databases section click phpmyadmin. After phpmyadmin loads select your joomla database. Navigate to the jos_users table (replace jos_ with your own database prefix). Click the edit icon next to the administrator user.

joomla admin password phpmyadmin
Click the edit icon and edit the password field

Now the password displayed under the “password” column is an encrypted and salted so there is no way of recovering it. Use the MD5 Encryption Tool to generate an MD5 encrypted password which is required by Joomla. Following are some examples

secret = 5ebe2294ecd0e0f08eab7690d2a6ee69
private = 2c17c6393771ee3048ae34d6b380c5ec

Next to the password field delete the old string and place the new one. Do take note that this is just an encrypted password and can be easily decrypted. Click go, log out of the phpmyadmin panel. Now go to http://yourjoomlasite.com/administrator login with your admin username and the new password and IMMEDIATELY change your administrator password to something else secure.

Method 2:- Using the MySQL command line tool

If you don’t have phpmyadmin installed or if you have access to the MySQL command line tool then run a SQL query to change the password. First go to MD5 Encryption Tool and generate a MD5 encrypted hash. Then open the MySQL command line client and run the following queries
mysql> connect joomla;
mysql> update test_users set password='5ebe2294ecd0e0f08eab7690d2a6ee69' where usertype='Super Administrator';

Replace joomla with your joomla database name and test_users with your databaseprefix_users.

joomla admin password mysql cmd
Type the SQL query to update the password field with a new password

IMMEDIATELY login to your joomla administrator panel and change the password.

Method 3:- Using PHP MySQL function

This method is extremely useful if your on a shared hosting server which has no phpmyadmin. Since it is shared you’ll have no means to access MySQL command line tools. But worry not you can query the database using PHP. Generate an MD5 encrypted password using MD5 Encryption Tool then create a PHP file named passchange.php and enter the following code
<?php
ini_set("display_errors","On");
$con=mysql_connect("localhost","username","password");
mysql_select_db("joomla",$con);
mysql_query("update test_users set password='2c17c6393771ee3048ae34d6b380c5ec' where usertype='Super Administrator'") or die(mysql_error());
?>

Replace localhost, username, password, joomla with your MySQL host, username, password and joomla database name, similarly the table name test_users should contain your database prefix. Access the file via the web browser by typing the url (http://yourjoomlasite.com/passchange.php) is you see a blank page without errors the its most likely the password has been changed. Go to your joomla control panel login using your admin username and new password and change the password IMMEDIATELY to something secure.

Note:- Method 2 and 3 will work properly only if there is one Super Administrator, if there are 2 or more then all their passwords will be changed because the condition given in the query says “update” the table “where usertype=’Super Administrator'”

Related posts:

forgot mysql password windows smileyResetting MySQL root password in Windows linux category thumbnailForgot MySQL root user password (Linux) linux category thumbnailReset Root Password in Linux linux category thumbnailHow to set a GRUB password php category thumbnailCreating a PHP MySQL Login Page Script

Tags: forgot password, joomla, mysql, phpmyadmin

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Get a wealth of information delivered to your inbox. Subscribe and never miss a single article.

  • Tutorials and howtos
  • Code, scripts and commands
  • Online Tools

* No spam, unsubscribe anytime

Hire Me

  • SSL installation and hardening (A+ on Qualys SSL test)
  • Apache & Nginx configuration
  • Email deliverability improvement (10/10 on Mail Tester & MailGenius)
  • WordPress customization, optimization and migration
  • and much more…

    Tools

    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool

    Nav

    • Home
    • About Me
    • Contact Me
    • Privacy Policy
    • Sitemap
    Vultr SSD VPS

    Creative Commons License
    Jesin's Blog by Jesin A is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
    Based on a work at websistent.com.