Outra solução alternativa, ao invés de modificar as fontes do makepasswd, é instalar o daemon haveged
para acelerar o processo de geração de chaves. Para instalá-lo:
sudo apt-get install haveged
Depois de instalá-lo, makepasswd
funciona como deveria.
O daemon haveged
agora é necessário em VMs e iOTs (por exemplo, framboesa), em que a entropia é normalmente baixa.
Do Debian, man haveged
:
NAME
haveged
- Generate random numbers and feed Linux's random device.DESCRIPTION
haveged
generates an unpredictable stream of random numbers harvested from the indirect effects of hardware events on hidden processor state (caches, branch predictors, memory translation tables, etc) using the HAVEGE (HArdware Volatile Entropy Gathering and Expansion) algorithm. The algorithm operates in user space, no special privilege is required for file system access to the output stream.Linux pools randomness for distribution by the
/dev/random
and/dev/urandom
device interfaces. The standard mechanisms of filling the/dev/random
pool may not be sufficient to meet demand on systems with high needs or limited user interaction. In those circumstances,haveged
may be run as a privileged daemon to fill the/dev/random
pool whenever the supply of random bits in/dev/random
falls below the low water mark of the device.