Making strong passwords in Unix with mkpasswd

If you need to generate a secure customized password in Unix (Linux,BSD,Solaris) there is a command line utility created by Don Libes from the National Institute of Standards and Technology called mkpasswd that will help you to choose a strong random pass,  you can get makepasswd from any Linux repository and there is a FreeBSD port and it can be used in Windows via Cygwin. 

mkpasswd examples

  • To generate a 10 characters random password: mkpasswd –char=10 
  • To generate a random Linux password using specified characters: mkpasswd -s “insertwordhere” 
  •  To generate a hard to guess random password made up of 12 characters: mkpasswd -l 12
  • To generate a random 12 characters password with at least 2 digits and 4 uppercase characters: mkpasswd -l 12 -d 2 -C 4

Check out mkpasswd –help to learn all of the possible options or see mkpasswd man page online.

Leave a Reply

Your email address will not be published. Required fields are marked *