Skip to content

SERVER_HASHED_PASSWORD incorrect password #195

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

Open
1 task done
estuardoquan opened this issue Mar 29, 2025 · 7 comments
Open
1 task done

SERVER_HASHED_PASSWORD incorrect password #195

estuardoquan opened this issue Mar 29, 2025 · 7 comments

Comments

@estuardoquan
Copy link

estuardoquan commented Mar 29, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I've tried running both my personal py srcipt with bcrypt, which starts with $2b$12$; and the argon one on the example 'thisismypassword' and both of them are failing... please advice

Expected Behavior

No response

Steps To Reproduce

// docker-compose.yml
...
environment:
...
    HASHED_PASSWORD: $$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4

Environment

- OS: Fedora Server
- How docker service was installed: via dnf

CPU architecture

x86-64

Docker creation

docker compose up -d

Container logs

editor-1  | [migrations] started                                                                                                             │ Fedora 41 - x86_64                                                                                  100% |  57.1 KiB/s |  30.5 KiB |  00m01s
editor-1  | [migrations] no migrations found                                                                                                 │ Fedora 41 - x86_64 - Updates                                                                        100% |   1.8 MiB/s |   2.7 MiB |  00m01s
editor-1  | ───────────────────────────────────────                                                                                          │Repositories loaded.
editor-1  |                                                                                                                                  │augeas-libs.x86_64 1.14.2-0.4.20250324git4dffa3d.fc41 updates
editor-1  |       ██╗     ███████╗██╗ ██████╗                                                                                                │[admin@fedora:~] $ sudo dnf update
editor-1  |       ██║     ██╔════╝██║██╔═══██╗                                                                                               │[sudo] password for admin: 
editor-1  |       ██║     ███████╗██║██║   ██║                                                                                               │Updating and loading repositories:
editor-1  |       ██║     ╚════██║██║██║   ██║                                                                                               │ Fedora 41 - x86_64 - Updates                                                                        100% |  91.5 KiB/s |  28.9 KiB |  00m00s
editor-1  |       ███████╗███████║██║╚██████╔╝                                                                                               │ Fedora 41 - x86_64 - Updates                                                                        100% |   1.8 MiB/s |   2.8 MiB |  00m02s
editor-1  |       ╚══════╝╚══════╝╚═╝ ╚═════╝                                                                                                │Repositories loaded.
editor-1  |                                                                                                                                  │Package                                        Arch        Version                                        Repository                     Size
editor-1  |    Brought to you by linuxserver.io                                                                                              │Upgrading:
editor-1  | ───────────────────────────────────────                                                                                          │ augeas-libs                                   x86_64      1.14.2-0.4.20250324git4dffa3d.fc41             updates                     1.2 MiB
editor-1  |                                                                                                                                  │   replacing augeas-libs                       x86_64      1.14.2-0.1.20240903git2de06e0.fc41             anaconda                    1.2 MiB
editor-1  | To support LSIO projects visit:                                                                                                  │
editor-1  | https://www.linuxserver.io/donate/                                                                                               │Transaction Summary:
editor-1  |                                                                                                                                  │ Upgrading:          1 package
editor-1  | ───────────────────────────────────────                                                                                          │ Replacing:          1 package
editor-1  | GID/UID                                                                                                                          │
editor-1  | ───────────────────────────────────────                                                                                          │Total size of inbound packages is 413 KiB. Need to download 413 KiB.
editor-1  |                                                                                                                                  │After this operation, 256 B extra will be used (install 1 MiB, remove 1 MiB).
editor-1  | User UID:    1000                                                                                                                │Is this ok [y/N]: y
editor-1  | User GID:    1000                                                                                                                │[1/1] augeas-libs-0:1.14.2-0.4.20250324git4dffa3d.fc41.x86_64                                        100% |   1.1 MiB/s | 412.7 KiB |  00m00s
editor-1  | ───────────────────────────────────────                                                                                          │---------------------------------------------------------------------------------------------------------------------------------------------
editor-1  | Linuxserver.io version: 4.98.2-ls261                                                                                             │[1/1] Total                                                                                          100% | 595.5 KiB/s | 412.7 KiB |  00m01s
editor-1  | Build-date: 2025-03-22T20:23:16+00:00                                                                                            │Running transaction
editor-1  | ───────────────────────────────────────                                                                                          │[1/4] Verify package files                                                                           100% | 250.0   B/s |   1.0   B |  00m00s
editor-1  |                                                                                                                                  │[2/4] Prepare transaction                                                                            100% |  17.0   B/s |   2.0   B |  00m00s
editor-1  | [custom-init] No custom files found, skipping...                                                                                 │[3/4] Upgrading augeas-libs-0:1.14.2-0.4.20250324git4dffa3d.fc41.x86_64                              100% |   3.4 MiB/s |   1.2 MiB |  00m00s
editor-1  | [2025-03-29T16:40:37.290Z] info  code-server 4.98.2 e2c489dd00f163b1a8d959965b0c30c1a978a080                                     │[4/4] Removing augeas-libs-0:1.14.2-0.1.20240903git2de06e0.fc41.x86_64                               100% |   1.2 KiB/s | 245.0   B |  00m00s
editor-1  | [2025-03-29T16:40:37.291Z] info  Using user-data-dir /config/data                                                                │Complete!
editor-1  | [2025-03-29T16:40:37.307Z] info  Using config file /config/.config/code-server/config.yaml                                       │[admin@fedora:~] $ 
editor-1  | [2025-03-29T16:40:37.307Z] info  HTTP server listening on http://0.0.0.0:8443/                                                   │
editor-1  | [2025-03-29T16:40:37.307Z] info    - Authentication is enabled                                                                   │
editor-1  | [2025-03-29T16:40:37.307Z] info      - Using password from $HASHED_PASSWORD                                                      │
editor-1  | [2025-03-29T16:40:37.307Z] info    - Not serving HTTPS                                                                           │
editor-1  | [2025-03-29T16:40:37.307Z] info  Session server listening on /config/data/code-server-ipc.sock                                   │
editor-1  | Connection to 127.0.0.1 8443 port [tcp/*] succeeded!                                                                             │
editor-1  | [ls.io-init] done.
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@estuardoquan
Copy link
Author

unsafe password works tho...

@j0nnymoe
Copy link
Member

You haven't wrapped the password in "'s like it shows.

@estuardoquan
Copy link
Author

estuardoquan commented Mar 29, 2025

i've tried;

- HASHED_PASSWORD=$$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4

- HASHED_PASSWORD="'$$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4'"

- HASHED_PASSWORD='"$$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4"'

HASHED_PASSWORD: $$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4

HASHED_PASSWORD: "'$$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4'"

HASHED_PASSWORD: '"$$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4"'

weird

@Roxedus
Copy link
Member

Roxedus commented Mar 29, 2025

- "HASHED_PASSWORD=$$argon2i$$v=19$$m=4096,t=3,p=1$$wST5QhBgk2lu1ih4DMuxvg$$LS1alrVdIWtvZHwnzCM1DUGg+5DTO3Dt1d5v9XtLws4"

https://docs.linuxserver.io/general/docker-compose/#quoting-variables

@vrai
Copy link

vrai commented Mar 31, 2025

I'm seeing the same issue. Even with quotes the hashed password isn't accepted.

However I generated my password hash differently as the suggested approach - npc argon2-cli - has a large red warning telling you to use the argon2 binary directly. So I generated my hash using:

echo '$PASSWORD' | argon2 $SALT -e

@vrai
Copy link

vrai commented Mar 31, 2025

I'm seeing the same issue. Even with quotes the hashed password isn't accepted.

However I generated my password hash differently as the suggested approach - npc argon2-cli - has a large red warning telling you to use the argon2 binary directly. So I generated my hash using:

echo '$PASSWORD' | argon2 $SALT -e

It turns out that I was just being an idiot. I hadn't taken into account that echo adds a newline. I regenerated the hash using:

echo -n '$PASSWORD' | argon2 $SALT -e

Which fixed my particular issue.

@Roxedus Roxedus closed this as completed Apr 5, 2025
@Roxedus Roxedus reopened this Apr 5, 2025
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Apr 5, 2025
@LinuxServer-CI LinuxServer-CI moved this from Done to Issues in Issue & PR Tracker Apr 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Issues
Development

No branches or pull requests

4 participants