Closed Riscky closed 3 years ago
Approach:
php -r 'print password_hash(
"{{ password }}\", PASSWORD_DEFAULT);'`, capture stdoutRun this SQL:
INSERT INTO user (username, name, password) VALUES ('judgehost', 'User for Judgehosts', '{{ pw_hash }}');
INSERT INTO userrole (userid, userrole) VALUES (last_insert_id(), (SELECT roleid FROM role WHERE role = 'judgehost'));
Ignore failures as this means the user already exists
note the
/opt/domjudge/domserver/etc/initial_admin_password.secret
/opt/domjudge/domserver/etc/restapi.secret
files in the domserver container
This is now done by hand