I was writing a script the other day and had to generate a password and found the nifty tool call makepasswd.
makepasswd is a command that generate true random passwords using /dev/random.
To install you do
sudo apt-get install makepasswd
To generate a password you do
and if you want a 16 character password you do
makepasswd --chars 16