November 1, 2011

APG ( automated password generator ) runs slow on CentOS

I use apg to generate random password all the time. On a new vpn server I built, apg was taking a long time to generate a pass, I traced it back to “not enough entropy”

You can see how much entropy you have with this command:

cat /proc/sys/kernel/random/entropy_avail

It should be at least in the hundreds, if its not you can use rng-tools to help you out.

sudo yum install rng-tools
echo “rngd -r /dev/urandom -o /dev/random -t 3” >> /etc/rc.local
rngd -r /dev/urandom -o /dev/random -t 3

that should generate enough entropy and you can go back to doing some real work 🙂