I am looking for deterministic password generators which are available for Linux. My goal is to have one password to remember and use that to make passwords for all my logins.

  • 2
    "Deterministic" pretty much defeats the purpose of "password generator", as those should be as unpredictable as possible. What's your intent for such a program?
    – Alejandro
    Commented Oct 23, 2018 at 3:30
  • @Alejandro I would be using it for my passwords on websites. Commented Oct 23, 2018 at 3:54
  • 1
    But why those have to be "deterministic". That's a very bad characteristic for a password. They ideally should be as random as possible. Why is deterministic a desirable feature?
    – Alejandro
    Commented Oct 23, 2018 at 10:48
  • Something that also fits your use case but isn't an answer to your question is using a password manager, like KeePass. You have the benefit of only having to remember one password, without the negative aspect of your passwords being deterministally derived from your master password. Your individual passwords can just be random, and you only have to remember the master password to access your password manager.
    – kutschkem
    Commented Oct 24, 2018 at 11:41

3 Answers 3


Try the pwgen util. Depending what options are used, pwgen can be both:

  1. Deterministic, by using a predefined hash, or the hash from a given file; here the file is a bash process substitution with printf which ought to output the same result everywhere:

    pwgen -N 1 -H <(printf foobar) 14

    ...would output every time:

  2. Random, e.g.:

    pwgen -N 1 -s 14

    ...would output a different random password every time.


Ritchey Password Pre-salter is free, opensource, and available for Linux. A Debian package can be found here, and a portable version can be found here.

php /opt/ritchey-password-presalter/cli.php --output TRUE ---password "yourpassword" ---salt "stackexchange" ---maxlength "12"

This command will create a 12 character password. In this example the password created is ceeb4ea2!1Aa. If the value of salt is changed to the name of each website you create a password for, you will only need to remember the value of password to recreate them.

php /opt/ritchey-password-presalter/cli.php --output TRUE ---password "yourpassword" ---salt "stackexchange" ---maxlength "12"

php /opt/ritchey-password-presalter/cli.php --output TRUE ---password "yourpassword" ---salt "youtube" ---maxlength "12"

php /opt/ritchey-password-presalter/cli.php --output TRUE ---password "yourpassword" ---salt "wikipedia" ---maxlength "12"

In this example each of these commands uses the same value for password, and the name of the website they correspond to is used for salt. This results in 3 unique passwords (ceeb4ea2!1Aa, a94040b8!1Aa, e31dc83b!1Aa) but you only have to remember the value of password.

If you prefer to be prompted for options there is also an interactive command.

php /opt/ritchey-password-presalter/icli.php

  • Does one really have to specify the master password on the command line? That would definitely disqualify it – as that way it goes to the shell history (and also is shortly visible in the process list), and thus would be a target to hackers.
    – Izzy
    Commented Oct 23, 2018 at 6:24

You could just create a hash of your single password concatenated with the use case, e.g. sha256 of "passwordfacebook" or sha256 of "passwordstackexchange" and use that hash as the password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.