There are several good howto’s explaining how you can reset a lost phpBB admin password, but all of them use phpMyAdmin for mysql access. Since I had to do this a few days ago, I thought other might benefit from such a howto that uses only command line utilities if phpmyadmin is not available.
Identifying the MySQL user/password
Locate the config.php file under your main phpBB installation directory. If you are using the debian phpBB package then the particularity of this package is that the config.php from the installation folder /var/www/phpbb2/site/config.php just calls the real config file from /etc/phpbb2/config.php
Inside the config file identify the following information:
1 2 3 4
Resetting the admin password
Using the above information connect to the mysql server using the mysql client command line:
1 2 3
If you don’t know the admin username running the following mysql query will return all the admin level users in phpbb:
(normally there is just one such user called Admin, but depending on the install/config this can be different).
Now that we know the admin username, or if you knew it already (let’s assume it is called ‘Admin’) then just run on the mysql cli:
to get the current user details (including the encrypted password, etc.).
To change the password just run:
Note: another quick way to achieve the same thing is to ‘promote’ another use to admin level and use that one for the management interface:
If you have phpmyadmin available on your system then you can still use the above information as it should be quicker to do this from cli, but in case you prefer to use phpmyadmin just use the web interface to edit the admin record and change the password (while in the function box leave MD5).