Skip to content
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

Add generate_random_salt.sh script #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

anzz1
Copy link

@anzz1 anzz1 commented Jan 22, 2025

As pointed out in #1 and #4 , the addition of SteamIdHashSalt has confused some users.

To help users I added a script 'generate_random_salt.sh' to automatically generate a random 32-length hexadecimal string and write it to reunion.cfg.
It's also helpful for hlds container autoconfiguration scripts and the like.
Also changed the Readme to reflect this.

The script should be compatible with pretty much any distro out there as it requires tools that should exist in any of them: grep, wc, sed plus one of openssl / hexdump / xxd / tr.
The script checks for the existence of these tools and chooses the correct one or fails gracefully if it cannot find them.

The script is a good stopgap solution but further on it could be considered that if SteamIdHashSalt is left blank, ReUnion would automatically create a random salt and write it to reunion.cfg.
This is as simple as reading random bytes from /dev/urandom on Linux or using advapi32:SystemFunction036() on Windows (SystemFunction036 is supported by WinXP/Server2003 and up, so on earlier Windows it could still fall back to the original error message).

@stamepicmorg stamepicmorg requested review from a team, stamepicmorg, s1lentq and SergeyShorokhov and removed request for a team and stamepicmorg January 22, 2025 22:22
allows for automatic configuration of SteamIdHashSalt on Linux (or WSL)
updated the readme to reflect this
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.

1 participant