LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mkpasswd

generates password hashes suitable for /etc/shadow or similar uses

TLDR

Generate password hash
$ mkpasswd [password]
copy
Generate with specific method
$ mkpasswd -m sha-512 [password]
copy
Generate with salt
$ mkpasswd -S [salt] [password]
copy
Generate random password
$ mkpasswd -l [16]
copy
List available methods
$ mkpasswd -m help
copy

SYNOPSIS

mkpasswd [options] [password]

DESCRIPTION

mkpasswd generates password hashes suitable for /etc/shadow or similar uses. It can use various hashing algorithms and optionally generate random passwords.The tool is useful for creating encrypted passwords for system configuration files and automated provisioning.

PARAMETERS

-m method

Hash method (sha-512, sha-256, md5, des).
-S salt
Specify salt value.
-R rounds
SHA rounds count.
-l length
Generate random password of length.
-s, --stdin
Read password from stdin.
-5
Use MD5 (shortcut).
-P fd
Read password from file descriptor.

INSTALL

sudo apt install whois
copy
sudo dnf install whois
copy
sudo pacman -S whois
copy
sudo apk add expect
copy
sudo zypper install whois
copy
brew install whois
copy
nix profile install nixpkgs#whois
copy

CAVEATS

Different versions have different options. whois package version differs from expect package. Strong methods recommended (sha-512). Avoid storing plaintext passwords.

HISTORY

mkpasswd exists in multiple implementations. The whois package version is common on Debian/Ubuntu, while others may have the expect package version. Both provide password hashing but with different options.

SEE ALSO

passwd(1), openssl(1), chpasswd(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid