Documentation
Maintaining FOSSBilling
Manually resetting your administrator password

Manually resetting your administrator password

Before you begin, please make sure you have a backup of your database.

We will be making changes directly to the database, and if something goes wrong, you will need to restore your database from a backup.

This article will show you how to manually reset your administrator password by making changes directly to the database. This is useful if you have lost access to your administrator account and can't use the password reset feature.

We will be using phpMyAdmin to make the changes to the database. If you want to use a different tool, you can, but the steps will be different.

Step 1: Log into phpMyAdmin

Log in to phpMyAdmin using the credentials you use to log in to your web hosting control panel. This will vary depending on your server.

If you are using shared hosting and unsure, please contact your web hosting provider.

Step 2: Select the database

Select the database you installed FOSSBilling to. This is the one you specified during the installation process. If you're unsure, you can check the config.php file in the root of your installation.

Screenshot demonstrating selecting the database from the phpMyAdmin sidebar

'db' => 
  array (
    'type' => 'mysql',
    'host' => 'localhost',
    'port' => '3306',
    'name' => 'fossbilling',
    'user' => 'fossbilling_user',
    'password' => 'fossbilling_password',
  ),

Step 3: Find your account

In the navigation bar on the top, click on the "Structure" tab. This tab will show you the tables in the database. Search for the "admin" table and click on it.

Screenshot demonstrating selecting the "admin" table in the "Structure" tab

Once you're there, click on the "Browse" tab. This will show you all the accounts in the "admin" table. Find the account and click on the "Edit" button.

Screenshot demonstrating clicking on the "Edit" button

Step 4: Change the password

In the "Edit" page, you will see the "pass" field. The field accepts a bcrypt hash. You will need to generate a hash using a tool like this one (opens in a new tab).

Do not use your actual password. Instead, use a dummy one like we did. Once you regain access to your account, you should change the password to something more secure using the admin panel.

Screenshot demonstrating creating a hash

Once you have the hash, paste it into the "pass" field and click the "Go" button.

Screenshot demonstrating editing the row

Step 5: Log in and change your password to something more secure

Now that you have access to your account, you should change your password to something more secure.

You can do this by clicking on your name in the top right corner, clicking on "Profile", and changing your password using the "Change Password" tab.