rda0 / mkpw

Generates strong passwords for linux logins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mkpw

Description

Generates random secure passwords suitable for linux logins, prints out the cleartext password and the corresponding sha-512 hash. The hash includes a random salt and 10000 rounds. All randomness is generated using /dev/urandom.

Requirements

  • mkpasswd

mkpasswd is provided by the package whois, on debian based distributions run the following command to install it:

apt install whois

Usage

Usage: ./mkpw.sh [option] [length [amount]]

    Generates strong passwords suitable for linux logins.

Output: <cleartext-password>   <hashed-password>

Options:

    length
        Password length (default=32)
    amount
        Amount of passwords generated (default=1)
    -g, --graph
        Use printable characters only (default)
    -a, --alnum
        Use alphanumeric characters only
    -p, --print
        Use printable characters including space
    -c, --custom
        Use custom character set (ETH Zurich): -#,./:=?@[]^{}~a-zA-Z0-9
    -d, --default
        Use default character set: \-`_~!@#$%^&*()+={}[]|;:"<>,.?/a-zA-Z0-9'
    -h, --help
        Print this help message
    -m, --method TYPE
        Compute the password using the TYPE method.
        Possible values for TYPE:
        sha-512  SHA-512  (default)
        sha-256  SHA-256
        md5      MD5
        des      standard 56 bit DES-based crypt(3)

About

Generates strong passwords for linux logins

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%