Networking HowTos
Networking HowTos

Generate random passwords on Ubuntu

May 13, 2013 Linux, Ubuntu

The ‘makepasswd’ package on Ubuntu can be used to easily generate random passwords. This package is part of the Ubuntu repositories, however probably wont be installed by default. It also has the ability to generate MD5 hashes of the random passwords.
Install makepasswd:

$ sudo apt-get -y install makepasswd

Generate a random password:
You can now run makepasswd to generate a random password.

$ makepasswd

Example output:

$ makepasswd
6HL5y9F9sC

Generate 5 random passwords:

$ makepasswd --count=5

Example output:

$ makepasswd --count=5
50MgAYqgr
RMWtg0pB
VtPyKoC0F
GHIhF4N7T
oTLDeCGPVW

Generate MD5 hashed passwords:

$ makepasswd --crypt-md5

Example output:

$ makepasswd --crypt-md5
1D84KuJVP    $1$fGLlRs3L$ONJ5Kr65zNIbum0TGUpxy.

You Might Also Like