- pwgen
- openssl
- gpg gpg2
- mkpasswd makepasswd
- md5sum
- /dev/urandom
- sha256sum
- sha1pass
Recently we had written an article aboutn our website.
It will help you to validate your password strength and score.
We can manually create few passwords which we required but if you would like to generate a password for multiple users or servers, what will be the solution.
Yes, there are many utilities are available in Linux to fulfill this requirements. However, I’m going to include the best five password generators in this article.
These tools will generates a strong random passwords for you. These are easy to use, that’s why I preferred to go with it. By default it will generate a strong password and if you would like to generate a super strong password then use the available options.
It will help you to generate a super strong password in the following combination. It should have minimum 12-15 characters length, that includes Alphabets (Lower case & Upper case), Numbers and Special Characters.
The list of tools are below.
- openssl: The openssl program is a command line tool for using the
various cryptography functions of OpenSSL’s crypto library from the
shell. - gpg: OpenPGP encryption and signing tool
- mkpasswd: generate new password, optionally apply it to a user
- makepasswd: makepasswd generates true random passwords using
/dev/urandom, with the emphasis on security over pronounceability. - /dev/urandom file: The character special files /dev/random and
/dev/urandom (present since Linux 1.3.30) provide an interface to the
kernel’s random number generator. - md5sum: md5sum is a computer program that calculates and verifies
128-bit MD5 hashes. sha256sum: The program sha256sum is designed to
verify data integrity using the SHA-256 (SHA-2 family with a digest
length of 256 bits). - sha1pass: sha1pass creates a SHA1 password hash. In the absence of
salt value on the command line, a random salt vector will be
generated.
How to generate Random & Strong password in Linux using pwgen Command?
The pwgen program generates passwords which are designed to be easily memorized by humans, while being as secure as possible.Human-memorable passwords are never going to be as secure as completely random passwords.
Use -s option to generate completely random, hard-to-memorize passwords. These should only be used for machine passwords as we can’t memorize.
For Fedora system, use DNF Command to install pwgen.
For Debian/Ubuntu systems, use APT-GET Command or APT Command to install pwgen.
For Arch Linux based systems, use Pacman Command to install pwgen.
For RHEL/CentOS systems, use YUM Command to install pwgen.
For openSUSE Leap system, use Zypper Command to install pwgen.
How to use pwgen command in Linux?
It’s a simple and straight forward method. Use one of the below preferred examples for you. By default, it generates a human memorable password.
To do so, simple run the pwgen command on your terminal. It generates 160 passwords in a single shot. These 160 passwords are printed in 20 rows and 8 columns.
To generate a secure random password, use -s option with pwgen command.
If you would like to generate a strong five passwords with 14 characters length, use the following format.
If you really want to generate a super strong random twenty passwords, use the following format.
How to generate Random & Strong password in Linux using openssl Command?
The openssl program is a command line tool for using the various cryptography functions of OpenSSL’s crypto library from the shell.
Run the openssl command with the following format to generate a random strong password with 14 characters.
If you would like to generate ten random strong password with 14 characters using openssl command then use the following for loop.
How to generate Random & Strong password in Linux using gpg Command?
gpg is the OpenPGP part of the GNU Privacy Guard (GnuPG). It is a tool to provide digital encryption and signing services using the OpenPGP standard. gpg features complete key management and all the bells and whistles you would expect from a full OpenPGP implementation.
Run the gpg command with the following format to generate a random strong password with 14 characters.
If you would like to generate ten random strong password with 14 characters using gpg command then use the following for loop.
How to generate Random & Strong password in Linux using mkpasswd Command?
mkpasswd generates passwords and can apply them automatically to users. With no arguments, mkpasswd returns a new password. It’s part of an expect package so, you have to install expect package to use mkpasswd command.
For Fedora system, use DNF Command to install mkpasswd.
For Debian/Ubuntu systems, use APT-GET Command or APT Command to install mkpasswd.
For Arch Linux based systems, use Pacman Command to install mkpasswd.
For RHEL/CentOS systems, use YUM Command to install mkpasswd.
For openSUSE Leap system, use Zypper Command to install mkpasswd.
Run the mkpasswd command in terminal to generate a random password.
Run the mkpasswd command with the following format to generate a random strong password with 14 characters.
Run the mkpasswd command with the following format to generate a random strong password with 14 characters. It combinations of alphabetic (Lower & Upper case), Numeric number and special characters.
If you would like to generate ten random strong password with 14 characters (It combination of alphabetic (Lower & Upper case), Numeric number and special characters) using mkpasswd command then use the following for loop.
How to generate Random & Strong password in Linux using makepasswd Command?
makepasswd generates true random passwords using /dev/urandom, with the emphasis on security over pronounceability. It can also encrypt plaintext passwords given on the command line.
Run the makepasswd command in terminal to generate a random password.
Run the makepasswd command with the following format to generate a random strong password with 14 characters.
Run the makepasswd command with the following format to generate ten random strong password with 14 characters.
How to generate Random & Strong password in Linux using Multiple Commands?
Still if you are looking other options then you can use the following utilities to generate a random password in Linux.
Using md5sum: md5sum is a computer program that calculates and verifies 128-bit MD5 hashes.
Using /dev/urandom: The character special files /dev/random and /dev/urandom (present since Linux 1.3.30) provide an interface to the kernel’s random number generator. File /dev/random has major device number 1 and minor device number 8. File /dev/urandom has major device number 1 and minor device number 9.
Using sha256sum: The program sha256sum is designed to verify data integrity using the SHA-256 (SHA-2 family with a digest length of 256 bits).
Using sha1pass: sha1pass creates a SHA1 password hash. In the absence of a salt value on the command line, a random salt vector will be generated.