PASSWORD
— Generate random strings
suitable for use as passwords.
Syntax:
PASSWORD
/A:
min,
max /C:
n /D:
min,
max /E:
min,
max /F /L:
min,
max /N:
n /P:
min,
max /S:
min,
max /Y
/A: min, max | the number of alphabetic characters to use |
/C: n | specify the case of the alphabetic characters: |
0: random | |
1: lowercase | |
2: uppercase | |
3: word case | |
5: alternating | |
6: leet (vowels lower, consonants upper) | |
7: unleet (reverse of the above) | |
/D: min, max | the number of digits to use |
/E: min, max | the number of extended characters to use |
/F | make the first character a letter if possible |
/L: min, max | the total length of the password, in characters |
/N: n | the number of strings to generate |
/P: min, max | the number of punctuation characters to use |
/S: min, max | the number of syllables to use |
/Y | also copy the password to the clipboard |
This command displays proposed passwords to standard output. Output can be redirected.
The default behavior is to generate a password from 7 to 10 characters long.
You can specify the desired length with
/L:
min,
max.
The allowed range is 4 to 1024 characters. If you specify only one value after
the /L:
it will be used as both the minimum and the maximum. (All
the other options which accept a min,
max
range behave the same way.)
/A:
min,
max
sets the number of alphabetic characters to include. ‘Alphabetic characters’
are the unaccented Latin letters, A to Z. The values must be from 0 to 512.
The legal range is from 0 to 512 alpha characters.
/D:
min,
max
specifies the number of digits to include; digits are of course 0 to 9. The
legal range is from 0 to 128 digits.
Punctuation is by default limited to standard ASCII punction marks with no
special meaning to TCC: !@#$*()-_=+;:,./?{}~
You can specify a
custom set of punctuation characters by setting an environment variable named
PUNCTUATION_CHARACTERS
. You may include from 0 to 64 punctuation
characters.
‘Extended characters’ are the Unicode code points from U+00C0
through U+00FF: accented Latin letters, thorn, eth, easc, eszett, and a few
other hard-to-type glyphs. These characters are not included unless you
specify a nonzero value using /E:
. You can include up to 64
extended characters.
‘Syllables’ are series of four letters, alternating consonant and vowel sounds. They are intended to be somewhat pronounceable, and perhaps more memorable than an entirely random letter salad. Syllables are not guaranteed to be real words; nor are they not guaranteed not to be real words. You may include up to 64 syllables.
The /C:
n case option, if specified,
is only applied to the regular Latin letters A — Z. It does not
affect extended characters. If you specify /C:3
(word case), then
the first letter in a run of consecutive letters will be capitalized and the
remainder will be in lowercase. These runs are not likely to correspond to
actual words. The /C:5
option will give roughly equal numbers of
uppercase and lowercase letters.
rem Generate a 10-character random password, and
rem stash it on the clipboard:
password /l:10 /y
This command also saves its parameters for future calls to the
_PASSWORD
variable.