Skip to content

Commit

Permalink
Other minor docs tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
BelleNottelling committed Mar 26, 2024
1 parent 3f0fe2f commit dff05ab
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions pages/docs/contribution-handbook/guides/creating-a-module.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ $this->di['mod_service']('Staff')->checkPermissionsAndThrowException('example',

#### More involved example

<Callout type="warning" emoji={<FontAwesomeIcon icon={faTriangleExclamation} />}>
Please be certain to use the `\FOSSBilling\InformationException` exception class when denying access. This exception class is not forwarded via error reporting which helps ensure your module does not produce excess error reports.
</Callout>

```PHP
$staff_service = $this->di['mod_service']('Staff');
if (!$staff_service->hasPermission(null, 'example', 'delete_something')) {
Expand Down
28 changes: 20 additions & 8 deletions pages/docs/maintaining-fossbilling/admin-manual-reset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,36 @@ title: Manually resetting your administrator password
description: This article will show you how to manually reset your administrator password.
---

import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faWrench, faHand } from '@fortawesome/free-solid-svg-icons'
import { Callout } from 'nextra-theme-docs'
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faWrench, faHand } from "@fortawesome/free-solid-svg-icons";
import { Callout } from "nextra-theme-docs";

# <FontAwesomeIcon icon={faWrench} /> Manually resetting your administrator password

<Callout type="error" emoji={<FontAwesomeIcon icon={faHand} />}>
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.
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.
</Callout>

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](/img/guides/admin-manual-reset/pma_db.png)

```php {6}
'db' =>
'db' =>
array (
'type' => 'mysql',
'host' => 'localhost',
Expand All @@ -41,6 +44,7 @@ Select the database you installed FOSSBilling to. This is the one you specified
```

## 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](/img/guides/admin-manual-reset/pma_table.png)
Expand All @@ -50,6 +54,13 @@ Once you're there, click on the "Browse" tab. This will show you all the account
![Screenshot demonstrating clicking on the "Edit" button](/img/guides/admin-manual-reset/pma_row.png)

## Step 4: Change the password

<Callout type="error" emoji={<FontAwesomeIcon icon={faHand} />}>
When using online tools to hash your password, **do not** enter your real password. Use a temporary password instead and reset it from within FOSSBilling.

Password hashing websites may be farming passwords & their related hashes and should by default not be something you trust.
</Callout>

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](https://www.browserling.com/tools/bcrypt).

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.
Expand All @@ -61,6 +72,7 @@ Once you have the hash, paste it into the "pass" field and click the "Go" button
![Screenshot demonstrating editing the row](/img/guides/admin-manual-reset/pma_edit.png)

## 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.
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.
2 changes: 1 addition & 1 deletion pages/docs/server-managers/whm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FOSSBilling is integrated with WHM using it's API. We will briefly describe how
## Adding a WHM server to FOSSBilling

1. Login to your admin panel.
2. Go to `Configuration` -> `Hosting plans and servers` from within the side panel.
2. Go to `System` -> `Hosting plans and servers` from within the navigation bar.
3. Go to the "New server" tab and fill out the name, hostname, and IP address, and nameservers for your server.
4. Select the `Server manager` drop down and select `WHM (cPanel)` from the drop-down.
5. Enter the WHM ROOT username (NOT the name you gave the API in WHM). This must be a username that you use to log into your WHM server!
Expand Down

0 comments on commit dff05ab

Please sign in to comment.