dimanche 1 février 2015

Generating a random password; why isn't this portable?


I want to generate a random password, and am doing it like so:



</dev/urandom tr -dc [:graph:] | head -c 64


On my laptop, which runs Ubuntu, this produces only printable characters, as intended. But when I ssh into my school's server, which runs Red Hat Enterprise Linux, and run it there, I get outputs like 3!ri�b�GrӴ��1�H�<�oM����&�nMC[�Pb�|L%MP�����9��fL2q���IFmsd|l�K, which won't do at all. What might be going wrong here?



Aucun commentaire:

Enregistrer un commentaire