Here is the simplest way to reset your joomla (3.x/4.x) password, if you have root access to the server (and database access):
- Log into your joomla server as root.
- Run the following command on the server:
php -r "echo password_hash('my__new__password321', PASSWORD_BCRYPT) . PHP_EOL;"$2y$10$Vpi.NZOi95DB5vcxtbscNe06pK8nOm1xf1w/Qdtkuu.WfJohiDR/u - Log into mysql (probably with the following command, unless your database is on another server):
mysql -u root - Find your joomla database:
show databases;+--------------------+| Database |+--------------------+| joomla1 | <-- here| information_schema | - Switch to your database:
use joomla1; - Find your table prefix:
show tables;+-------------------------------+| Tables_in_joomla1 |+-------------------------------+| qasdf_action_log_config | - Now that you know it's "qasdf" (or whatever), find your user:
select username from qasdf_users\G*************************** 1. row ***************************
username: admin1 row in set (0.00 sec) - Update the password:
update qasdf_users
set password='$2y$10$Vpi.NZOi95DB5vcxtbscNe06pK8nOm1xf1w/Qdtkuu.WfJohiDR/u'
where username='admin';
Query OK, 1 row affected (0.00 sec)Rows matched: 1 Changed: 1 Warnings: 0 - You're done! Log in!