mkpasswd
A simple and lightweight mkpasswd image based on Alpine. Great for generating password hashes.
5.4K
Hi! We're Dan and Jay. We're a two person team with a passion for open source products. We created Server Side Up to help share what we learn.
All of our software is free an open to the world. None of this can be brought to you without the financial backing of our sponsors.
This repository contains the Dockerfile for the mkpasswd image. This image allows you to generate secure passwords using the mkpasswd command.
Use the latest tag to get the latest stable release of the image.
This Docker container allows you to generate passwords using mkpasswd from the whois package with customizable options.
You can run this Docker container directly using the command line. By default, it uses SHA-512 as the hashing method.
docker run --rm -it serversideup/mkpasswd
This command will output a salted hash which you can use directly.
To specify a different hashing method, you can provide the --method option followed by the method name.
docker run --rm -it serversideup/mkpasswd --method=md5crypt
| Method Name | Hash |
|---|---|
| sha512crypt | SHA-512 |
| sha256crypt | SHA-256 |
| md5crypt | MD5 |
| descrypt | standard 56 bit DES-based crypt(3) |
You can always run the -m help command to view all available methods.
docker run --rm -it serversideup/mkpasswd -m help
To add a specific salt, use the -S option followed by your desired salt value.
docker run --rm -it serversideup/mkpasswd --method=sha-512 -S mysalt
This command uses SHA-512 with a custom salt, enhancing the security of the generated hash.
The default behavior without any additional arguments is to generate a salted hash using the SHA-512 method. If no specific salt is provided, mkpasswd automatically generates a random salt.
Here are some examples of how to use this Docker image:
Generate a default SHA-512 salted hash:
docker run --rm -it serversideup/mkpasswd
Generate a hash using MD5 without a salt:
docker run --rm -it serversideup/mkpasswd --method=md5crypt
Generate a hash using SHA-512 with a specified salt:
docker run --rm -it serversideup/mkpasswd --method=sha-512 -S mysalt
These examples should help you get started with generating passwords securely using the Docker container.
Please feel free to open an issue or submit a pull request if you encounter any problems. We're always learning and open to suggestions.
If you find a bug or issue, please submit an issue →
Since there are a lot of dependencies on these images, please understand that it can make it complicated on merging your pull request.
We'd love to have your help, but it might be best to explain your intentions first before contributing.
If you find a critical security flaw, please open an issue or learn more about our responsible disclosure policy.
Content type
Image
Digest
sha256:8d8246d0c…
Size
3.3 MB
Last updated
about 2 years ago
docker pull serversideup/mkpasswdPulls:
156
Jun 29 to Jul 5