makepasswd - Man Page

Generates (pseudo-)random passwords and hashes

Examples (TL;DR)

Synopsis

makepasswd [-c string] [-e algorithm] [-i iterations] [-l length] [-M maximum length] [-m minimum length] [-n count] [-p password] [-S] [-s salt]

makepasswd [-E] [-c string] [-e algorithm] [-i iterations] [-l length] [-M maximum length] [-m minimum length] [-n count] [-S] [-s salt]

Description

makepasswd is a program that generates pseudo-random passwords of a desired length and, if so desired, along with their corresponding hashes for a given encryption algorithm.

Options

The following options are available:

-E

In this operation mode, makepasswd enumerates through all possible values for a password, given the list of characters allowed and the length specified.

-c string

Sets the string of characters allowed within passwords, when generating them randomly.

-e

Apply a specific hashing algorithm to the password generated. The list of passwords currently supported is:

  • base64 (always supported)
  • blowfish (Blowfish)
  • des (single DES)
  • md5 (MD5, always supported)
  • sha1 (SHA-1)
  • sha256 (SHA-256)
  • shmd5 (shadow MD5)
  • none (always supported)

For the algorithms not explicitly mentioned as always supported, their availability depends on the implementation of the crypt(3) library on the system where makepasswd was compiled.

-i

Force a number of iterations to be performed when hashing passwords, for algorithms effectively supporting it. It otherwise defaults to a random value, in a range considered reasonable for the hashing algorithm selected.

-l

Force the passwords generated to be of a fixed length.

-M

Maximum length for the passwords generated.

-m

Minimum length for the passwords generated.

-n

Total number of passwords to generate. When not set, it defaults to only one, except in enumeration mode where it processes the complete range of possibilities until exhaustion.

-p

Force a given value for the password generated. This is useful when generating hashes for pre-determined passwords.

-S

Do not seed the PRNG (pseudo-random number generator) ourselves. With this option set, the entropy pool is often not initialized, and the passwords generated predictable as a result.

Use this option carefully, when you know that either the system does provide better entropy than makepasswd, or that it hurts performance in a situation where entropy is not required.

-s

Force a given value when salting the resulting password hash. This is only useful when selecting a hashing algorithm that effectively uses salt.

Bugs

Issues can be listed and reported at http://www.defora.org/os/project/bug_list/117/makepasswd.

See Also

login(1), passwd(1)

Authors

Pierre Pronchery <khorben@defora.org>

Code and documentation.

Gabor Z. papp <gzp@papp.hu>

Testing.

Referenced By

passwd(1).

07/18/2024 makepasswd User Manual