mkpasswd.pl - Man Page

example to generate new password with String::MkPasswd

Synopsis

  mkpasswd.pl [-options]

  #!/bin/sh
  NEW_PASSWD=`mkpasswd.pl`

Description

This program generates a random password, allowing for some tuning of character distribution.  The password is sent to standard output.

Options

-l # | --length=#

The total length of the password.  The default is 9.

-d # | --digits=#

The minimum number of digits that will appear in the final password. The default is 2.

-c # | --lower=#

The minimum number of lower-case characters that will appear in the final password.  The default is 2.

-C # | --upper=#

The minimum number of upper-case characters that will appear in the final password.  The default is 2.

-s # | --special=#

The minimum number of non-alphanumeric characters that will appear in the final password.  The default is 1.

-2 | --distribute

If specified, password characters will be distributed between the left- and right-hand sides of the keyboard.  This makes it more difficult for an onlooker to see the password as it is typed.

--nodigits | --no-digits

Alias for --digits=0.

--nolower | --no-lower

Alias for --lower=0.

--noupper | --no-upper

Alias for --upper=0.

--nospecial | --no-special

Alias for --special=0.

Bugs

Todo

See Also

<http://expect.nist.gov/#examples>, mkpasswd(1), String::MkPasswd

Aknowledgements

Don Libes of the National Institute of Standards and Technology, who wrote the Expect example, mkpasswd(1).

Author

Chris Grau <cgrau@cpan.org>

Info

2025-06-06 perl v5.40.2 User Contributed Perl Documentation