0

This is what I'm working with:

pwgen 15 1 -cny

I need to include at least one uppercase letter, one number and one symbol.

What I need to change is to make it include one of these symbols:

"! @ # $ % ^ * - _ + = & ~"

How do I do that?

2

You can use -r to specify list of characters to not be included in the password, so if you want only specific list of symbols to be used, you can use list of symbols pwgen uses, remove yours from the list and use it for -r.

pwgen 15 1 -cny -r "\"\'(),./:;<>?[\\]\`{|}"
T+aPpfP61Y6yZs!

Unfortunately this will stop working if pwgen ever decides to change the list of symbols but I don't see other way to do it with pwgen only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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