Installation stops during setting up fogproject password
-
@Sebastian-Roth said in Installation stops during setting up fogproject password:
cat /dev/urandom | tr -cd ‘0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~’ | fold -w12 | head -n1
-
@Tom-Elliott said in Installation stops during setting up fogproject password:
cat /dev/urandom | tr -dc ‘0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~’ | head -c ${1:-12}
[root@fog-ls15nb ~]# cat /dev/urandom | tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' | head -c ${1:-12} (02;(D~#ZFBHtr: Schreibfehler: Broken pipe tr: Schreibfehler cat: Schreibfehler: Broken pipe [root@fog-ls15nb ~]#
Just a note: Thanks for the help so far and for your patience.
-
@Deimos said in Installation stops during setting up fogproject password:
How about:tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' < /dev/urandom | head -c ${1:-12}
-
Another option that doesn’t seem to loop forever:
head /dev/urandom | tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' | fold -w12 | shuf -n1
What this one does, it breaks at the first new line urandom gives (so much faster return and not infinite loop), pipes that output to tr, folds it to a width of 12 characters, and shuffles the data returned from the fold.
Hopefully this may help?
-
@Tom-Elliott said in Installation stops during setting up fogproject password:
tr -dc ‘0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~’ < /dev/urandom | head -c ${1:-12}
[root@fog-ls15nb ~]# tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' < /dev/urandom | head -c ${1:-12} 2>}?w0vfI8o]tr: Schreibfehler: Broken pipe tr: Schreibfehler [root@fog-ls15nb ~]#
Think this works:
[root@fog-ls15nb ~]# head /dev/urandom | tr -dc '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' | fold -w12 | shuf -n1 !F!lOldRC)r6 [root@fog-ls15nb ~]#
But where can I add/replace this to the installation-script?
-
@Deimos said in Installation stops during setting up fogproject password:
But where can I add/replace this to the installation-script?
Take a look here: https://github.com/FOGProject/fogproject/blob/master/lib/common/functions.sh#L1261
You find that file in
fogproject/lib/common/functions.sh
on your system… -
Thanks, I will try this tomorrow.
-
it seems generating passwords in fog has been an issue for a while… be it special characters that need handled or double vs single quotes to contain it…
Lately in my own projects, I opt for very long passwords made from upper & lower case letters and numbers randomly. I’m talking 32, or 64 characters long. Typically I look up the maximum length supported password, and generate one of that length, just letters and numbers.
-
Works. Well done, everybody.
do [[ -z $password || $ret -ne 999 ]] && password=$(head /dev/urandom | tr -cd '0-9a-zA-Z' | fold -w12 | shuf -n1) echo -e "$password\n$password" | passwd $username >>$workingdir/error_logs/fog_error_${version}.log 2>&1 ret=$? let cnt+=1 done
Special thanks to @Sebastian-Roth for patience and to stay in touch.
-
@Wayne-Workman said in Installation stops during setting up fogproject password:
it seems generating passwords in fog has been an issue for a while… be it special characters that need handled or double vs single quotes to contain it…
Lately in my own projects, I opt for very long passwords made from upper & lower case letters and numbers randomly. I’m talking 32, or 64 characters long. Typically I look up the maximum length supported password, and generate one of that length, just letters and numbers.Good point you have there. Early this year we started thinking about moving to better password policy in general. Not using an empty password for mysql, setting a random passphrase for the web UI login and such. As sort of a preperation I committed a change that moves away from the original
openssl rand -base64 32
because I thought people wouldn’t even bother about trying to memorize a 32 length password (web UI login). But I got somehow sidetracked by too many other things and never finished what I initially thought about: Having different levels of complexity passwords instead of one fits all.So we might discuss this now before we change things again.
-
@Wayne-Workman said in Installation stops during setting up fogproject password:
own projects, I opt for very long passwords made from upper & lower case letters and numbers randomly. I’m talking 32, or 64 characters long. Typically I look up the maximum length supported password, and generate one of that length, just letters and numbers.
I tried another installation on an other, identical notebook fujitsu lifebook with fedora server 30, but allowed special characters in the function.sh and it works also.
do [[ -z $password || $ret -ne 999 ]] && password=$(head /dev/urandom | '0-9a-zA-Z!#$%&()*+,-./:;<=>?@[]^_{|}~' | fold -w12 | shuf -n1) echo -e "$password\n$password" | passwd $username >>$workingdir/error_logs/fog_error_${version}.log 2>&1 ret=$? let cnt+=1 done