Skip to content

Confusing behavior when using --ah-cli to generate hashes for another environment #408

@chinponya

Description

@chinponya

A lot of people seem to trip over the fact that in docker or systemd environments, the naive use of --ah-cli will produce incorrect hashes, due to the expectation that it will have access to the same generated ah-salt.

This can be solved by improving the documentation, but I am not certain what's the best solution here. So far I've been suggesting the following process:

  1. add show-ah-salt to [global] section in the config
  2. restart copyparty
  3. check the log for a line that looks like effective ah_salt is O4nO7p1ACFnuFk/EpcDdDM7H
  4. use the cli again to generate a password hash, using the same salt: copyparty-sfx.py --ah-cli --ah-alg argon2 --ah-salt [ah_salt_you_saw_in_the_log]

The alternative way could be to suggest setting $XDG_CONFIG_HOME in the call to --ah-cli, but the actual location seems to vary a lot depending on which systemd service implementation or docker is used. The file might also not be readable by the current user, making it not so straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions