Setting judgehost password programatically, via MariaDB cli client

Thijs Kinkhorst thijs at kinkhorst.com
Wed Feb 20 09:03:32 CET 2019


Hi Michał,

On Tue, February 19, 2019 19:55, Michał‚ Kaczanowicz wrote:
> My current task is to deploy domjudge - or more precisely, to create a
> "one click deploy" configuration. I aim to use docker images of
> domserver and domjudge. I'd like to accomplish my task using docker and
> docker compose. But here comes a slight problem. After setting up
> domserver, I need to set new password for judgehost user. Setup manual
> suggest to do it "by hand", via web interface on admin account. Is there
> a way to do that programatically, e.g. simply updating password for
> judgehost user in domjudge.user table? How is the hash computed?

Interesting project! Would be great if you could share the results!

You should be able to use PHP's password_hash() on the desired string like
this:

  $hash = password_hash("yourpasword", PASSWORD_DEFAULT);

Or on the command line:

  htpasswd -bnB "" yourpassword|tr -d ":\n"


Cheers,
Thijs



More information about the DOMjudge-devel mailing list