Recover administrative access from super Joomla user that due to bad configuration in the ACL is no longer an administrator?

1

Joomla , since version 1.6, allows a complex user access level, and, unlike previous versions where it was possible to be only a user role (super administrator, manager, author ...) allow granular permissions. That is, by accident, it would be possible to turn a user who has super administrator permissions no longer access admin, and it is extremely complicated to reverse this when changing directly in the database.

How to resolve this emergency situation and allow a non-admin user to have temporary access as if he were a super administrator ?

In this case, the user's password is known, but he has lost access permission. It is different from processes to reset super administrator password vua change in the database.

    
asked by anonymous 09.02.2014 / 20:18

1 answer

2

There is a way to make an ordinary user a super temporary administrator, as well as make a former super administrator. It requires access to your server's FTP.

This same mode can also be used if you have lost the super administrator password but know the password of an ordinary user, and just want to enter the administration of your site and reset your previous password .

  • Via FTP, go to the root of your site. It will have a configuration.php file. If necessary, change the file permissions to 644 or you will not be able to change the file.
  • Download the file to your computer, make a backup in addition to the one you will edit.
  • At the beginning of the file, just after the line containing class JConfig { , add the following public $root_user = 'username' ; where username is the user name of the account that has provisionally made a super administrator.
  • Upload the edited file, and overwrite the previous file.
  • With the username and password of the account you have defined as super administrator, log in to the administrative area of your Joomla, and solve the problem that has passed. If you have removed access permissions, add them again. If you forgot another user's password and used a regular user to access the admin and reset their previous password, do so.
  • Repeat the editing steps for the configuration.php file, and remove the line that allowed temporary access as a super administrator.
  • Return the access permissions of the file configuration.php to exactly as it was before, probably 444. This prevents a shared hosting person from knowing the location where this file is reading its contents.
  • 09.02.2014 / 20:18