Skip to main content

GeneratePassword

This Script is part of the Common Scripts Pack.#

Generates a password and allows various parameters to customize the properties of the password depending on the use case. For example, "password complexity requirements". The default behavior is to generate a password of random length including all four character classes, upper, lower, digits, and symbols, with at least five and at most ten characters per class.

The min_* values all default to 0.

This means that if the command is executed in this way: !GeneratePassword max_lcase=10 It is possible that a password of length zero could be generated. It is therefore recommended to always include a min_* parameter that matches.

The debug parameter will print certain properties of the command into the War Room for easy diagnostics.

Script Data#


NameDescription
Script Typepython
TagsUtility

Inputs#


Argument NameDescription
min_lcaseThe minimum number of lower case characters to include in password.
max_lcaseThe maximum number of lower case characters to include in password.
min_ucaseThe minimum number of upper case characters to include in password.
max_ucaseThe maximum number of upper case characters to include in password.
min_digitsThe minimum number of digits to include in password.
max_digitsThe maximum number of digits to include in password.
min_symbolsThe minimum number of symbols to include in password.
max_symbolsThe maximum number of symbols to include in password.
debugSees various values as they pass through the function if enabled.

Note: At least one of the following arguments should be above 0: min_uppercase, min_lowercase, min_digits, min_symbols

Outputs#


PathDescriptionType
NEW_PASSWORDThe new password generated for the user.Unknown