Skip to content

fix: Provide password hash to chpasswd instead - #107

Merged
kroese merged 1 commit into
dockur:masterfrom
tucksaun:patch-1
Aug 11, 2026
Merged

fix: Provide password hash to chpasswd instead#107
kroese merged 1 commit into
dockur:masterfrom
tucksaun:patch-1

Conversation

@tucksaun

Copy link
Copy Markdown
Contributor

As requested.

Current usage is broken because usermod is expecting the encrypted password as a value directly after -p flag.

However, chpasswd also supports encrypted password so let's use a single tool and align syntaxes.

Current usage is broken because `usermod` is expecting the encrypted password as a value directly after `-p` flag.

However, `chpasswd` also supports encrypted password so let's use a single tool and align syntaxes.
Copilot AI lite review requested due to automatic review settings August 11, 2026 15:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes root password setup in the container entrypoint when an encrypted password hash is provided, switching to chpasswd -e so the hash is applied correctly (and consistently with the non-hash path).

Changes:

  • Replace incorrect usermod -p usage with chpasswd -e when PASSWORD_HASH is set.
  • Standardize password setting logic to use chpasswd for both plaintext and hashed inputs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@kroese kroese changed the title fix: provide password hash to chpasswd instead fix: Provide password hash to chpasswd instead Aug 11, 2026
@kroese
kroese merged commit 67a8cdd into dockur:master Aug 11, 2026
2 checks passed
@tucksaun
tucksaun deleted the patch-1 branch August 12, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants