MKPWD(1)

NAME
mkpwd - generate new password

SYNOPSIS
mkpasswd [ options ] [ count ]

INTRODUCTION
mkpwd prints a randomly generated password to stdout. If count is provided, mkpwd will generate count-numbers of passwords and print them to stdout.

USAGE
With no options, mkpwd returns a new password. The passwords are randomly generated according to the options below. It's standard behavior is to generate a password of a length between 6 and 10 consisting of any printable ASCII-character.

OPTIONS

--version
    This option lets mkpwd print out the version number and exit. All other options are ignored.

--help
    Print out short help and exit. All other options are ignored.

--n length
    length must be an integer number. mkpwd will only generate passwords with the given minimum length.

-m length
    length must be an integer number. mkpwd will only generate passwords with the given maximum length.

-u  generate password with uppercase characters. This only affects characters of the US-alphabet.

-l  generate password with lowercase characters. This only affects characters of the US-alphabet.

-c salt
    salt must be a string of two characters. Every generated password is passed to the crypt()-function and the result is printed right after the password itself. Please read the manpage of crypt(3) for more information.

-t X
    X must be an integer value between 1 and 7. It specifies the way passwords are created. The following types are defined:

    1 - complex, passwords may contain any printable character
    2 - alphanum, password may contain [A-Z][a-z][0-9]
    3 - alpha, password may contain [A-Z] and [a-z]
    4 - numeric, the password is build of numbers only
    5 - alphanum-readable, see below
    6 - alpha-readable
    7 - hexasedicimal

The standard type is 1 (complex). If you use the type "alphanum-readable" the password is build of the characters [A-Z] and [a-z]. There is a 10% chance per character for it to become a number [0-9]. The type "alpha-readable" is the same execpt that no numbers get used. Both types try to generate a readable password. This is implemented by alternatingly using a consonant and a vocal character.

NOTICE
The gnu getopt() is really anoying. The arguments to options must be supplied by a equal-sign. You can not use something like "--crypt SA". Use "--crypt=SA" instead. This is a strange behavior of getopt() while processing arguments which may have an argument.

EXAMPLE
The following generates 10 passwords consisting only of lowercase alphabetic characters:
    mkpwd -l -t 3 10

AUTHOR
(c) 1999-2002 by Oliver Schroeder <post@o-schroeder.de> mkpwd stands under a BSD like license. See the copyright notice in the source file for more information.