From 48f3db3adff05ce388eef8509d45c6d347605057 Mon Sep 17 00:00:00 2001 From: Andrey Meshkov Date: Wed, 20 Oct 2021 17:50:18 +0300 Subject: [PATCH] Fix Reset Password instruction --- Configuration.md | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/Configuration.md b/Configuration.md index 5234603..82fa6b2 100644 --- a/Configuration.md +++ b/Configuration.md @@ -462,28 +462,45 @@ Removing an entry from settings file will reset it to the default value. Deletin ## Reset Web Password -AdGuard Home stores password as a BCrypt-encoded hash. +Please follow these steps to create a new password for your user account: -Here's what you need to do to change the password: +1. Install `htpasswd`, which is a part of *Apache2 Web Server*: -1. Stop AdGuard Home. + Ubuntu: -2. Open `AdGuardHome.yaml`. + `sudo apt-get install apache2` -3. Find the `password` field there. + Fedora: -4. Replace it with the new value. You can use the [`htpasswd`] utility or any - online BCrypt generation tool. For example: + `sudo dnf install apache2` - ```sh - htpasswd -b -n -B -C 10 '' MY_NEW_PASS | tr -d ':' - ``` + Windows: -5. Restart AdGuard Home. + > Choose a download from https://httpd.apache.org/docs/current/platform/windows.html#down, extract the downloaded folder, open a terminal, navigate to its `bin` folder with the `cd` command, and run `.\Htpasswd` (Note the capital H in the Windows version). -Now you'll be able to log in to Web interface using your new password. + Other versions of `htpasswd` could be used, but **only** if they support *bcrypt* hash encryption, which rules out e.g. most web-hosted `htpasswd` generators. -[`htpasswd`]: http://manpages.ubuntu.com/manpages/focal/en/man1/htpasswd.1.html +2. Use the `htpasswd` utility to generate a new hash: + + Ubuntu/Fedora: + + `htpasswd -B -n -b ` + + Windows: + + `.\Htpasswd -B -n -b ` + + It will print `:` to the terminal. + +3. Open `AdGuardHome.yaml` in a text editor with sudo rights. + + In the `users:` section, find your username and insert the `` value for the `password` setting: + + ```users: + - name: ... + password: ``` + +4. Save the file, restart AGH. Now you'll be able to log in to the Web interface using your new password.