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
Random generation of Rcon password can fail #1308
Comments
Thanks for reporting.
Well, this is not a fix, this is just removing the feature. What happens on the given machine if you run the specified line itself?
It's true however that the config var settings lack some checks to be "failproof". |
Thank you for your answer. As I said:
It implies that this line:
is also executed well. Also, I tried separately and it returned to me a random string as expected.
Right, I just believe that the |
I don't think getting rid of the random rcon password generation is a good option or having it as an optional (as it opens a can of worms for me). However finding the cause of the issue and fixing it is. There may be other options for random password generation that wont cause this issue. |
I just crashed my bash session with Yeah, seems this function is not very clean. :o)) |
Well, if what we want is a random token, |
Well, the less we add dependencies, the better. |
@UltimateByte Yes, but it's not really randomly "secure". |
Would require you to know the exact second the command was ran. There are many ways to generate random numbers though. I'll try to find a funny and efficient one. |
I think the date option is quite clever however we only need a few characters.. Is this random enough?
|
Piping to |
Yeah as @UltimateByte says you would need to know the exact second the command was run which is pretty unlikely. This might work well as it adds nanoseconds in to the command
|
uptime would be better, since load usage into it is almost impossible to track
(echo is required otherwise commands mess up) Edit: Mixing @dgibbs64 's trick:
|
The processes in a pipe succession cannot 'execute too fast', they are serially scheduled and their 3 streams are bound or conjoined before being scheduled. I'd like to see the raw strace. grep shouldn't give a write error unless /dev/urandom isn't available, isn't readable, or other more tangible error is present. Personally, I've used this for random password generation which omits strings: genpasswd() {
local l=$1
[ "$l" == "" ] && l=16
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
} invoked as One issue with cropping md5sum is that you'll never get upper-case nor underscore in the output. |
Related |
Suggested fix, which keeps it out of the useless uses of cat awards*: random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs) *which oddly enough doesn't appear to be a thing anymore. |
In the worst case, my suggestion is probably random enough for the purpose. |
Just a note: https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/functions/install_config.sh#L86 (could also be changed when a solution was found) |
LinuxGSM/lgsm/functions/install_config.sh Line 54 in 8cf8121
|
May the first one being available fix this soon, since this also causes trouble on regular installs as per #1453 and @Scarsz and @marvinlehmann kinda found out. |
I have the same problems as @RaitoBezarius when settings up an AWS CloudFormation template for LGSM. |
I have now added the fix @cedarlug suggested. Hopefully that will work :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Using Ansible to provision a machine under CentOS 7.0 with LinuxGSM and CS:GO in particular (here is the used playbook).
I found out that
auto-install
will hang even when it has finished downloading the serverfiles.Whereas, when typing the very same command over SSH manually, the
auto-install
completes immediately.After long session of
strace
-ing the bash script, the culprit was the following line ofinstall_config.sh
(L54).It seemed that execution of these processes was so fast, that it would break the pipe and cause the
grep
command to fail withgrep: write error
, eventually hanging the bash process.An easy fix is to, just, plainly remove the random generation, and put a dummy string.
After that, Ansible is able to complete the playbook and the provisioning.
I think that random generation of Rcon password must be rewritten, or, that
auto-install
offer more choice to the configuration (I'd prefer, if possible, to handle the Rcon password myself rather than getting an elegant choice for your everyone user.)As a workaround, what I do: run
auto-install
sufficiently long forinstall_config.sh
to appear.Monkey-patch it with
sed
and re-runauto-install
normally.The text was updated successfully, but these errors were encountered: