16

I have forgotten my super admin password.

How can I reset the super admin account password?
I have access to both FTP and phpMyadmin how can I change the Super User account password?

My table prefix is Xyz8_

1
  • The configuration.php (mentioned in your comments) has nothing to do with the super admin password, only with the user and password of the database!
    – jackJoe
    Commented Apr 23, 2014 at 10:44

6 Answers 6

15

From the joomla docs How do you recover or reset your admin password?

Method 1: Configuration.php

  1. Use an FTP program to access your site's ftp
  2. Locate and download the configuration.php
  3. Using a text editor open configuration.php and add the following line. Substitute myname to a name of an account with administrator access that you know the password.

    public $root_user='myname';

  4. Save the file configuration.php and upload it again via FTP to your site with file permissions 644. This user will now be a temporary super administrator.

  5. Login to the backend with the above account and change the lost admin's account password. You can also block or delete the old and create a new one instead.

  6. When finished, make sure to use the "Click here to try to do it automatically" link that appears in the alert box to remove the line that was added to the configuration.php file. If using the link was not successful, then go back and delete the added line from your configuration.php file using a text editor. Upload the configuration.php file back to the site.

  7. Using your FTP program verify the file permissions of the configuration.php file, they should be 444. If you manually removed the added line, then change the file permissions on the configuration.php file to 444.

Method 2: Directly Changing the Database entry

Locate the Super user in the database Xyz8_users table and in the password field enter the following:

d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199

The above changes the password to secret

Other values for the password are:

admin  = 433903e0a9d6a712e00251e44d29bf87:UJ0b9J5fufL3FKfCc0TLsYJBh2PFULvT
secret = d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199
OU812  = 5e3128b27a2c1f8eb53689f511c4ca9e:J584KAEv9d8VKwRGhb8ve7GdKoG7isMm

If you want to use a mysql query you can run the following:

INSERT INTO `Xyz8_users`
   (`name`, `username`, `password`, `params`)
VALUES ('Administrator2', 'admin2',
    'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '');
INSERT INTO `jos31_user_usergroup_map` (`user_id`,`group_id`)
VALUES (LAST_INSERT_ID(),'8');

After you gain access to your account you should immediately change the password to something secure as the above is public and supplied only for recovery purposes.

0
6

Joomla uses the Xyz8_users table for storing user data.

Reseting the passwort is simple just execute this query in phpmyadmin:

update Xyz8_users set password=md5('newpassword') where username='yourusername';

After changing the password with SQL, log into Joomla and it will be converted to an update passwort hashing method.

0
5

you should look for table Xyz8_users.

  1. Click "Browse" 2 List with all users will appear. Find the user you want to edit and click the "Edit" link in front of the row
  2. Find the "password" row and click on the select box under the "Function" column.
  3. Select "MD5" and type the new password in "Value" textarea.
  4. Click the "Go" button at the bottom of the page and you voila, your password is changed.

Regardsenter image description here

1
  • This answers all, because it explains that the password is encpryted with MD5 and shows the way to do it.
    – jackJoe
    Commented Apr 23, 2014 at 10:45
5

Method 1

In phpMyAdmin, go to the Xyz8_users table (change the table prefix, Xyz8_ to your table prefix if it is different.)

Select the record for the Super User account (the Super Admin account has an ID of 62 or 42 by default).

Copy and paste a known MD5 hash (one of the longer character strings below) into the password field.

admin = 21232f297a57a5a743894a0e4a801fc3

secret = 5ebe2294ecd0e0f08eab7690d2a6ee69

Save the record.

Log in to the back-end of your website with the new password, "admin" or "secret" or similar from above.

Once logged in, you can reset the password to anything you like.

Method 2

In phpMyAdmin, go to SQL tab and enter a MySQL query like the following example:

UPDATE `Xyz8_users` SET `password` = MD5( 'new-password' ) WHERE `Xyz8_users`.`username` = "admin" ;

(change the table prefix, Xyz8_ to your table prefix if it is different.)

"new_password" - replace this with the new password you wish to use.

"admin" - replace this if your admin username is different.

Click on the GO button to submit the query.

Log in to the back-end of your website with the new password

Reference: http://kb.siteground.com/article/How_to_reset_my_Joomla_administrator_password.html

0
4

There's also a tool available for Joomla 2.5 (haven't tested with Joomla 3): http://myext.eu/en/j25-login It's simply a PHP file that you upload to your /administrator/ folder and visit in your browser.

Log in as Super admin without account
How to: Сopy the file in "administrator" and go to [your_site]/administrator/log.php
WARNING: remove the file after use!

The contents of the PHP file is this:

<?php
define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);

if (file_exists(dirname(__FILE__) . '/defines.php')) {
    include_once dirname(__FILE__) . '/defines.php';
}

if (!defined('_JDEFINES')) {
    define('JPATH_BASE', dirname(__FILE__));
    require_once JPATH_BASE.'/includes/defines.php';
}

require_once JPATH_BASE.'/includes/framework.php';
require_once JPATH_BASE.'/includes/helper.php';
require_once JPATH_BASE.'/includes/toolbar.php';
$app = JFactory::getApplication('administrator');
JPluginHelper::importPlugin('user');
$user = JUser::getInstance();
$db = JFactory::getDBO();
$q = 'SELECT u.* FROM `#__users` as u
        LEFT JOIN `#__user_usergroup_map` as ug ON u.id = ug.user_id
        WHERE `block` = 0 AND `activation` = 0 AND ug.group_id = 8
        LIMIT 0,1';
$db->setQuery($q);

$user_tmp = $db->loadObject();
$user_tmp->guest = 0;
$user_tmp->isRoot = 1;
// $user_tmp->groups = array(8=>8);
// $user_tmp->_authGroups = array(1,8);
// $user_tmp->_authLevels = array(1,1,2,3);
// $user_tmp->gid = 1000;

foreach($user_tmp as $k=>$v){
    $user->set($k,$v);
}
$session = JFactory::getSession();
$session->set('user', $user);
$app = JFactory::getApplication();
$app->checkSession();
$app->redirect( JUri::base(), "" );
1

It is possible for recover the admin password.

Two ways to recover the admin password.

Step 1

Edit configuration.php file

public $root_user='myname';

Step 2

Edit #__user table in database.

http://docs.joomla.org/How_do_you_recover_or_reset_your_admin_password%3F

  1.Navigate to phpMyAdmin and select the database for the Joomla! site in the left-hand drop-down list box. This will show the database tables on the left side of the screen.


  2.Find and click on the table with "_users" appended in the list of tables (note: you may have a prefix that is not jos_, simply go to the _users table for your prefix).


  3.Click on the "Browse" button in the top toolbar. This will show all of the users that are set up for this site.


  4.Find the user whose password you want to change and press the Edit icon for this row.


  5.A form will display that allows you to edit the password field. Copy the value

*d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199*

into the password field and press the Go button. phpMyAdmin should display the message "Affected rows: 1". At this point, the password should be changed to "secret".


  6.Log in with this user and password and change the password of this user to a secure value. Check all of the users using the User Manager to make sure they are legitimate. If you have been hacked, you may want to change all of the passwords on the site. 
1
  • Could you please edit you answer and add a summary for step 2? Commented Apr 25, 2014 at 8:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.