| 1 |
.TH MKPASSWD 1 "22 August 1994" |
| 2 |
.SH NAME |
| 3 |
mkpasswd \- generate new password, optionally apply it to a user |
| 4 |
.SH SYNOPSIS |
| 5 |
.B mkpasswd |
| 6 |
[ |
| 7 |
.I args |
| 8 |
] |
| 9 |
[ |
| 10 |
.I user |
| 11 |
] |
| 12 |
.SH INTRODUCTION |
| 13 |
.B mkpasswd |
| 14 |
generates passwords and can apply them automatically to users. |
| 15 |
mkpasswd is based on the code from Chapter 23 of the O'Reilly book |
| 16 |
"Exploring Expect". |
| 17 |
.SH USAGE |
| 18 |
With no arguments, |
| 19 |
.B mkpasswd |
| 20 |
returns a new password. |
| 21 |
|
| 22 |
mkpasswd |
| 23 |
|
| 24 |
With a user name, |
| 25 |
.B mkpasswd |
| 26 |
assigns a new password to the user. |
| 27 |
|
| 28 |
mkpasswd don |
| 29 |
|
| 30 |
The passwords are randomly generated according to the flags below. |
| 31 |
|
| 32 |
.SH FLAGS |
| 33 |
The |
| 34 |
.B \-l |
| 35 |
flag defines the length of the password. The default is 9. |
| 36 |
The following example creates a 20 character password. |
| 37 |
|
| 38 |
mkpasswd \-l 20 |
| 39 |
|
| 40 |
The |
| 41 |
.B \-d |
| 42 |
flag defines the minimum number of digits that must be in the password. |
| 43 |
The default is 2. The following example creates a password with at least |
| 44 |
3 digits. |
| 45 |
|
| 46 |
mkpasswd \-d 3 |
| 47 |
|
| 48 |
The |
| 49 |
.B \-c |
| 50 |
flag defines the minimum number of lowercase alphabetic characters that must be in the password. |
| 51 |
The default is 2. |
| 52 |
|
| 53 |
The |
| 54 |
.B \-C |
| 55 |
flag defines the minimum number of uppercase alphabetic characters that must be in the password. |
| 56 |
The default is 2. |
| 57 |
|
| 58 |
The |
| 59 |
.B \-s |
| 60 |
flag defines the minimum number of special characters that must be in the password. |
| 61 |
The default is 1. |
| 62 |
|
| 63 |
The |
| 64 |
.B \-p |
| 65 |
flag names a program to set the password. |
| 66 |
By default, /etc/yppasswd is used if present, otherwise /bin/passwd is used. |
| 67 |
|
| 68 |
The |
| 69 |
.B \-2 |
| 70 |
flag causes characters to be chosen so that they alternate between |
| 71 |
right and left hands (qwerty-style), making it harder for anyone |
| 72 |
watching passwords being entered. This can also make it easier for |
| 73 |
a password-guessing program. |
| 74 |
|
| 75 |
The |
| 76 |
.B \-v |
| 77 |
flag causes the password-setting interaction to be visible. |
| 78 |
By default, it is suppressed. |
| 79 |
|
| 80 |
.SH EXAMPLE |
| 81 |
The following example creates a 15-character password |
| 82 |
that contains at least 3 digits and 5 uppercase characters. |
| 83 |
|
| 84 |
mkpasswd \-l 15 \-d 3 \-C 5 |
| 85 |
|
| 86 |
.SH SEE ALSO |
| 87 |
.I |
| 88 |
"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" |
| 89 |
\fRby Don Libes, |
| 90 |
O'Reilly and Associates, January 1995. |
| 91 |
.SH AUTHOR |
| 92 |
Don Libes, National Institute of Standards and Technology |
| 93 |
|
| 94 |
.B mkpasswd |
| 95 |
is in the public domain. |
| 96 |
NIST and I would |
| 97 |
appreciate credit if this program or parts of it are used. |
| 98 |
|
| 99 |
|