-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always use WEBPASSWORD env var if set #1106
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
PromoFaux
force-pushed
the
use_env_webpassword
branch
from
June 6, 2022 19:14
7cef129
to
6b9a4e6
Compare
…t=1106&issues=AYE6byrIbM3H9G6ifn9K&open=AYE6byrIbM3H9G6ifn9K&id=pi-hole_docker-pi-hole) Signed-off-by: Adam Warner <me@adamwarner.co.uk>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Closed
PromoFaux
approved these changes
Jun 6, 2022
Paraphraser
added a commit
to Paraphraser/IOTstack
that referenced
this pull request
Jan 22, 2023
Circa July 9, 2022 [docker-pi-hole PR 1106](pi-hole/docker-pi-hole#1106) made some significant changes to how the admin password is handled. The only documentation for this change was in [Changelog 2022.07](https://github.com/pi-hole/docker-pi-hole/releases/tag/2022.07): > Always use WEBPASSWORD env var if set by @rdwebdesign in #1106 This change was reported on [Discord](https://discord.com/channels/638610460567928832/638610461109256194/1066408650077388860). To summarise the new behaviour: 1. If `WEBPASSWORD` is not set on first launch, a random password is generated. 2. If `WEBPASSWORD` is not set on second-or-subsequent launch, whatever password was already in effect is re-used. This also applies when there is no admin password. 3. If `WEBPASSWORD` is defined but has a null value, any pre-existing password is cleared and the Web UI bypasses the login screen. 4. If `WEBPASSWORD` is defined and has a value, that value is always used to update the admin password stored internally. This PR adjusts the IOTstack Pi-hole template to default to the third option above (ie no admin password). This avoids the need for any "build" process and the need to set/generate any password, and obviates the need for the associated Python scripts which have been removed. A comment is added to the service definition template directing users to the IOTstack wiki page where the behaviour of `WEBPASSWORD` is documented in full. This change should only affect new users. Any existing users who had followed the previous procedure of selecting Pi-hole, choosing a password or allowing one to be generated, and bringing up the container would have an admin password matching the value of `WEBPASSWORD`. Any existing users who had reset their password via: ``` $ docker exec pihole pihole -a -p myNewPassword ``` will either have: 1. Changed their service definition to match. The July 9 2022 changes would already be enforcing `WEBPASSWORD` on each launch. 2. Not changed their service definition to match. The July 9 2022 changes would already have reverted to the value of `WEBPASSWORD`. 3. Removed `WEBPASSWORD` from their list of environment variables. The July 9 2022 changes would continue to use the existing password. This PR also takes the opportunity to: 1. Re-align the service definition entries. 2. Adopt new-style TZ which either accepts a value from `~/IOTstack/.env` or defaults to `Etc/UTC`. 3. Add a comment pointing to the Pi-hole documentation for its supported environment variables. IOTstack Pi-hole documentation updated. Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
If WEBPASSWORD env variable is set, it will be used.
A new password will be created only if WEBPASSWORD is not set and no password is found in
setupVars.conf
.Motivation and Context
Fix #1087
How Has This Been Tested?
Types of changes
Checklist: