From dff05abe6fc211b5917a9f91198d59b597fc337f Mon Sep 17 00:00:00 2001 From: Belle Aerni Date: Tue, 26 Mar 2024 12:06:59 -0700 Subject: [PATCH] Other minor docs tweaks --- package-lock.json | 6 ++-- .../guides/creating-a-module.mdx | 4 --- .../admin-manual-reset.mdx | 28 +++++++++++++------ pages/docs/server-managers/whm.mdx | 2 +- 4 files changed, 24 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index cfabe034..88a097cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2983,9 +2983,9 @@ "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" }, "node_modules/katex": { - "version": "0.16.9", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.9.tgz", - "integrity": "sha512-fsSYjWS0EEOwvy81j3vRA8TEAhQhKiqO+FQaKWp0m39qwOzHVBgAUBIXWj1pB+O2W3fIpNa6Y9KSKCVbfPhyAQ==", + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.10.tgz", + "integrity": "sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==", "funding": [ "https://opencollective.com/katex", "https://github.com/sponsors/katex" diff --git a/pages/docs/contribution-handbook/guides/creating-a-module.mdx b/pages/docs/contribution-handbook/guides/creating-a-module.mdx index e60f135e..2cf767d4 100644 --- a/pages/docs/contribution-handbook/guides/creating-a-module.mdx +++ b/pages/docs/contribution-handbook/guides/creating-a-module.mdx @@ -118,10 +118,6 @@ $this->di['mod_service']('Staff')->checkPermissionsAndThrowException('example', #### More involved example -}> - 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. - - ```PHP $staff_service = $this->di['mod_service']('Staff'); if (!$staff_service->hasPermission(null, 'example', 'delete_something')) { diff --git a/pages/docs/maintaining-fossbilling/admin-manual-reset.mdx b/pages/docs/maintaining-fossbilling/admin-manual-reset.mdx index bf4a2c5e..8f440603 100644 --- a/pages/docs/maintaining-fossbilling/admin-manual-reset.mdx +++ b/pages/docs/maintaining-fossbilling/admin-manual-reset.mdx @@ -3,15 +3,16 @@ 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"; # 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. + 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. @@ -19,17 +20,19 @@ This article will show you how to manually reset your administrator password by 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', @@ -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) @@ -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 + +}> + 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. + + 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. @@ -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. \ No newline at end of file +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. diff --git a/pages/docs/server-managers/whm.mdx b/pages/docs/server-managers/whm.mdx index 39a4eb44..bcae906b 100644 --- a/pages/docs/server-managers/whm.mdx +++ b/pages/docs/server-managers/whm.mdx @@ -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!