Public Repository

Last pushed: 2 years ago
Short Description
This is essentially Ubuntu with the whois package installed, enabling the mkpasswd command.
Full Description

The mkpasswd command can be used to generate various password hashes, useful for unattended installation scripts etc. Help output shown below.

Dockerfile is set up as:
ENTRYPOINT ["/usr/bin/mkpasswd"]
CMD ["-m", "sha-512"]

Running the container without arguments will yield a Password: prompt that takes input and returns a SHA-512 hash with random salt. Pass appropriate parameters if a different format is needed.

docker run --rm -it egray/mkpasswd -h
Usage: mkpasswd [OPTIONS]... [PASSWORD [SALT]]
Crypts the PASSWORD using crypt(3).

      -m, --method=TYPE     select method TYPE
      -5                    like --method=md5
      -S, --salt=SALT       use the specified SALT
      -R, --rounds=NUMBER   use the specified NUMBER of rounds
      -P, --password-fd=NUM read the password from file descriptor NUM
                            instead of /dev/tty
      -s, --stdin           like --password-fd=0
      -h, --help            display this help and exit
      -V, --version         output version information and exit

If PASSWORD is missing then it is asked interactively.
If no SALT is specified, a random one is generated.
If TYPE is 'help', available methods are printed.

Report bugs to <md+whois@linux.it>.
Docker Pull Command
Owner
egray