NAME

randpass - generate a random password or passphrase

SYNOPSIS

randpass [ -w | -p numwords ] [ -l numchars ] [ -c chars ] [ -s sourcefile ]

randpass [ --word | --phrase numwords ] [ --word-length numchars ] [ --chars chars ] [ --source sourcefile ]

DESCRIPTION

Generate a random password or passphrase in a particular `style'.

OPTIONS

-w | --word

Generate a password (the default).

-p | --phrase

Generate a passphrase of the specified number of words.

-c | --chars

The set of characters (specified as a string) used in generating a password.

You may specify a named set. Choose among these...

:std
('A'..'H', 'J'..'N', 'P'..'Z', ('a'..'n', 'p'..'z') x 2, '2'..'9')
: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).

( "\000".."\777" )
:bin7

Binary data (bytes 0 through 127).

( "\000".."\377" )
-l | --word-length

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).

-s | --source

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 randpass may 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 output.

-j | --join

When generating a passphrase, connect the words with the specified string rather than a space.

-h | --help

Display help.

VERSION

1.01

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.