NAME
randpass - generate random passwords and passphrases
SYNOPSIS
randpass [ options ]
DESCRIPTION
Generate random passwords and passphrases in a particular `style'.
OPTIONS
- -w, --word
-
Generate passwords (the default).
- -p, --phrase num
-
Generate passphrases with the specified number of words. The passphrase that is generated will not contain duplicate words (e.g.,
urial hayseed dumpish urial). This may not be a range. - -n, --count num
-
Generate the specified number of passwords or passphrases. This may not be a range.
- -l, --word-length num_or_range
-
The length of the password, or of each word in the passphrase.
If a range is specified (e.g.,
--word-length 8-14) then the length of the password (or of the words in the passphrase) will fall randomly within that range (including both endpoints). Half-open ranges (e.g.,--word-length 3-) are not allowed.The default is 7-14 for passwords and 4-7 for passphrases.
- -c, --chars string_or_special
-
The set of characters (specified as a sequence of characters) used in generating a password. This is currently ignored if passphrases are being generated.
You may specify a named set instead. Choose among these...
- :std
-
('A'..'H', 'J'..'N', 'P'..'Z', ('a'..'n', 'p'..'z') x 2, '2'..'9')This is the default.
- :alpha
-
('A'..'Z', 'a'..'z' ) - :alphanum
-
('A'..'Z', 'a'..'z', '0'..'9' ) - :num
-
('0'..'9' ) - :hex
-
Hexadecimal digits (lowercase).
('0'..'9', 'a'..'f' ) - :HEX
-
Hexadecimal digits (uppercase).
('0'..'9', 'A'..'F' ) - :bin
-
Binary data (bytes 0 through 255).
( "\x00".."\xFF" ) - :bin7
-
Binary data (bytes 0 through 127).
( "\x00".."\x7F" ) - -s, --source file_name
-
Specify the source file from which words will be drawn in generating a passphrase. This file will typically consist of a single word per line (but creative uses of
randpassmay do otherwise for interesting results).The default is
/usr/share/dict/words. The special file name-may be used to specify standard input.Note: If the source file doesn't have enough lines (of sufficient length) to generate the full passphrase, the program exits with code 1 and prints a suitable error message to standard error.
- -j, --join string
-
When generating a passphrase, connect the words with the specified string rather than a space.
- -h, --help
-
Display help.
VERSION
1.02
AUTHOR
Paul Hoffman < nkuitse AT cpan DOT org >
COPYRIGHT
Copyright 2003 Paul M. Hoffman. All rights reserved.
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.