1Password(3)           User Contributed Perl Documentation          Password(3)
2
3
4

NAME

6       Data::Password - Perl extension for assesing password quality.
7

SYNOPSIS

9               use Data::Password qw(IsBadPassword);
10
11               print IsBadPassword("clearant");
12
13               # Bad password - contains the word 'clear', only lowercase
14
15               use Data::Password qw(:all);
16
17               $DICTIONARY = 0;
18
19               $GROUPS = 0;
20
21               print IsBadPassword("clearant");
22

DESCRIPTION

24       This modules checks potential passwords for crackability.  It checks
25       that the password is in the appropriate length, that it has enough
26       character groups, that it does not contain the same chars repeatedly or
27       ascending or descending characters, or charcters close to each other in
28       the keyboard.  It will also attempt to search the ispell word file for
29       existance of whole words.  The module's policies can be modified by
30       changing its variables.  (Check "VARIABLES").  For doing it, it is rec‐
31       ommended to import the ':all' shortcut when requiring it:
32
33       use Data::Password qw(:all);
34

FUNCTIONS

36       1   IsBadPassword(password)
37
38           Returns undef if the password is ok, or a textual description of
39           the fault if any.
40
41       2   IsBadPasswordForUNIX(user, password)
42
43           Performs two additional checks: compares the password against the
44           login name and the "comment" (ie, real name) found on the user
45           file.
46

VARIABLES

48       1   $DICTIONARY
49
50           Minimal length for dictionary words that are not allowed to appear
51           in the password. Set to false to disable dictionary check.
52
53       2   $FOLLOWING
54
55           Maximal length of characters in a row to allow if the same or fol‐
56           lowing.  If $FOLLOWING_KEYBOARD is true (default), the module will
57           also check for alphabetical keys following, according to the Eng‐
58           lish keyboard layout.  Set $FOLLOWING to false to bypass this
59           check.
60
61       3   $GROUPS
62
63           Groups of characters are lowercase letters, uppercase letters, dig‐
64           its and the rest of the allowed characters. Set $GROUPS to the num‐
65           ber of minimal character groups a password is required to have.
66           Setting to false or to 1 will bypass the check.
67
68       4   $MINLEN
69
70           $MAXLEN
71
72           Minimum and maximum length of a password. Both can be set to false.
73
74       5   @DICTIONARIES
75
76           Location where we are looking for dictionary files. You may want to
77           set this variable if you are using not *NIX like operating system.
78

FILES

80       ·   /usr/dict/web2
81
82       ·   /usr/dict/words
83
84       ·   /etc/passwd
85

SEE ALSO

87       See Data::Password::BasicCheck if you need only basic password check‐
88       ing.
89

AUTHOR

91       Raz Information Systems, razinf@cpan.org, raz@raz.co.il.
92
94       Copyright (c) 2001 - 2006  Raz Information Systems Ltd.
95       http://www.raz.co.il/
96
97       This package is distributed under the same terms as Perl itself, see
98       the Artistic License on Perl's home page.
99
100
101
102perl v5.8.8                       2006-08-04                       Password(3)
Impressum