A way to create a random password yourself is using a password generator. The pwmake is a command-line tool for generating random passwords that consist of all four groups of characters: uppercase, lowercase, digits and special characters.
The utility allows you to specify the number of entropy bits that are used to generate the password. The entropy is pulled from /dev/urandom. The minimum number of bits you can specify is 56, which is enough for passwords on systems and services where brute force attacks are rare. 64 bits is adequate for applications where the attacker does not have direct access to the password hash file (/etc/shadow). For situations when the attacker might obtain the direct access to the password hash or the password is used as an encryption key, 80 to 128 bits should be used. If you specify an invalid number of entropy bits, pwmake will use the default of bits.
To create a password of 128 bits, enter the following command:
# pwmake 128 *oLhezv@Hal7YmUM;Igqilur0N&
If you found this useful, here's more on the same topic(s) in our blog:
- Using tmp.mount
- Resetting the Root Password of RHEL-7
- Install Python version 3 on Red Hat / CentOS
- Processes
- Report the end result of a TSM backup
Interested in learning more?