Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions keepercommander/commands/record_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@
Value Field type Description Example
==================== =============== =================== ==============
$GEN:[alg],[n] password Generates a random password $GEN:dice,5
Default algorith is rand alg: [rand | dice | crypto]
Optional: password length
Default algorithm is rand alg: [rand | dice | crypto]
Optional: length (min 8) $GEN or $GEN:rand,24
Includes upper, lower,
digits, and symbols
$GEN oneTimeCode Generates TOTP URL
$GEN:[alg,][enc] keyPair Generates a key pair and $GEN:ec,enc
optional passcode alg: [rsa | ec | ed25519], enc
Expand All @@ -205,8 +207,8 @@
pam config new --environment=local --title=config1 --gateway=gateway1 -sf=SHARED_FOLDER_UID \
--connections=on --tunneling=on --rotation=on --remote-browser-isolation=on

record-add --folder=SHARED_FOLDER_UID --title=admin1 -rt=pamUser login=admin1 password="$GEN:rand,16"
record-add --folder=SHARED_FOLDER_UID --title=user1 -rt=pamUser login=user1 password="$GEN:rand,16"
record-add --folder=SHARED_FOLDER_UID --title=admin1 -rt=pamUser login=admin1 password="$GEN"
record-add --folder=SHARED_FOLDER_UID --title=user1 -rt=pamUser login=user1 password="$GEN"
record-add --folder=SHARED_FOLDER_UID --title=machine1 -rt=pamMachine \
pamHostname="$JSON:{\"hostName\": \"127.0.0.1\", \"port\": \"22\"}"

Expand Down Expand Up @@ -416,8 +418,9 @@ def generate_password(parameters=None): # type: (Optional[Sequence[str]]) -> s
gen = generator.DicewarePasswordGenerator(length)
else:
if isinstance(length, int):
if length < 4:
length = 4
if length < 8:
logging.warning('Password length %d is below minimum 8. Using 8.', length)
length = 8
elif length > 200:
length = 200
else:
Expand Down
Loading