From aea653a071bc873fe211e7b0f7e96b0d6dbbb9d2 Mon Sep 17 00:00:00 2001 From: Jouy Durao <59381242+CosmicSnow@users.noreply.github.com> Date: Fri, 9 Aug 2024 18:40:39 -0300 Subject: [PATCH 1/3] Update How_to_generate_an_bcrypt_hash.md explain about double $ on password --- How_to_generate_an_bcrypt_hash.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/How_to_generate_an_bcrypt_hash.md b/How_to_generate_an_bcrypt_hash.md index d868d23c..eabec1b9 100644 --- a/How_to_generate_an_bcrypt_hash.md +++ b/How_to_generate_an_bcrypt_hash.md @@ -15,6 +15,9 @@ To generate a bcrypt password hash using docker, run the following command : docker run ghcr.io/wg-easy/wg-easy wgpw YOUR_PASSWORD PASSWORD_HASH='$2b$12$coPqCsPtcFO.Ab99xylBNOW4.Iu7OOA2/ZIboHN6/oyxca3MWo7fW' // literally YOUR_PASSWORD ``` +*Important*: in your configuration, make sure to use double "$", or your password may not work! +In the example of password "YOUR_PASSWORD" you may write like this: +PASSWORD_HASH=$$2b$$12$$coPqCsPtcFO.Ab99xylBNOW4.Iu7OOA2/ZIboHN6/oyxca3MWo7fW *Important* : make sure to enclose your password in single quotes when you run `docker run` command : From b18f91941964111dc26c8affaa47aa89aa615282 Mon Sep 17 00:00:00 2001 From: "Philip H." <47042125+pheiduck@users.noreply.github.com> Date: Sat, 10 Aug 2024 10:34:46 +0200 Subject: [PATCH 2/3] fixup How_to_generate_an_bcrypt_hash.md Password hash has to be in single quotes --- How_to_generate_an_bcrypt_hash.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/How_to_generate_an_bcrypt_hash.md b/How_to_generate_an_bcrypt_hash.md index eabec1b9..1a6a63c6 100644 --- a/How_to_generate_an_bcrypt_hash.md +++ b/How_to_generate_an_bcrypt_hash.md @@ -15,17 +15,14 @@ To generate a bcrypt password hash using docker, run the following command : docker run ghcr.io/wg-easy/wg-easy wgpw YOUR_PASSWORD PASSWORD_HASH='$2b$12$coPqCsPtcFO.Ab99xylBNOW4.Iu7OOA2/ZIboHN6/oyxca3MWo7fW' // literally YOUR_PASSWORD ``` -*Important*: in your configuration, make sure to use double "$", or your password may not work! -In the example of password "YOUR_PASSWORD" you may write like this: -PASSWORD_HASH=$$2b$$12$$coPqCsPtcFO.Ab99xylBNOW4.Iu7OOA2/ZIboHN6/oyxca3MWo7fW -*Important* : make sure to enclose your password in single quotes when you run `docker run` command : +*Important* : make sure to enclose your password in **single quotes** when you run `docker run` command : ```bash -$ echo $2b$12$coPqCsPtcF +$ echo $2b$12$coPqCsPtcF <-- not correct b2 -$ echo "$2b$12$coPqCsPtcF" +$ echo "$2b$12$coPqCsPtcF" <-- not correct b2 -$ echo '$2b$12$coPqCsPtcF' +$ echo '$2b$12$coPqCsPtcF' <-- correct $2b$12$coPqCsPtcF ``` From 8921d6c661616b7635f907d4f33dcd0dcb256c48 Mon Sep 17 00:00:00 2001 From: "Philip H." <47042125+pheiduck@users.noreply.github.com> Date: Sat, 10 Aug 2024 19:33:30 +0200 Subject: [PATCH 3/3] docker-compose.yml: reflect How_to_generate_an_bcrypt_hash.md --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index dd450ed9..f4c93c4a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: - WG_HOST=raspberrypi.local # Optional: - # - PASSWORD_HASH=$$2y$$10$$hBCoykrB95WSzuV4fafBzOHWKu9sbyVa34GJr8VV5R/pIelfEMYyG (needs double $$, hash of 'foobar123'; see "How_to_generate_an_bcrypt_hash.md" for generate the hash) + # - PASSWORD_HASH='$2y$10$hBCoykrB95WSzuV4fafBzOHWKu9sbyVa34GJr8VV5R/pIelfEMYyG' (hash of 'foobar123'; see "How_to_generate_an_bcrypt_hash.md" for generate the hash) # - PORT=51821 # - WG_PORT=51820 # - WG_CONFIG_PORT=92820