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

NAME

6       Data::Password - Perl extension for assessing 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               $SKIPCHAR = 0;
22
23               print IsBadPassword("clearant");
24

DESCRIPTION

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

FUNCTIONS

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

VARIABLES

50       1.  $DICTIONARY
51
52           Minimal length for dictionary words that are not allowed to appear
53           in the password. Set to false to disable dictionary check.
54
55       2.  $FOLLOWING
56
57           Maximal length of characters in a row to allow if the same or
58           following.  If $FOLLOWING_KEYBOARD is true (default), the module
59           will also check for alphabetical keys following, according to the
60           English keyboard layout.  Set $FOLLOWING to false to bypass this
61           check.
62
63       3.  $GROUPS
64
65           Groups of characters are lowercase letters, uppercase letters,
66           digits and the rest of the allowed characters. Set $GROUPS to the
67           number of minimal character groups a password is required to have.
68           Setting to false or to 1 will bypass the check.
69
70       4.  $MINLEN
71
72           $MAXLEN
73
74           Minimum and maximum length of a password. Both can be set to false.
75
76       5.  @DICTIONARIES
77
78           Location where we are looking for dictionary files. You may want to
79           set this variable if you are using not *NIX like operating system.
80
81       6.  $SKIPCHAR
82
83           Set $SKIPCHAR to 1 to skip checking for bad characters.
84
85       7.  $BADCHARS
86
87           Prohibit a specific character range. Excluded character range
88           regualr experssion is expect. (You may use ^ to allow specific
89           range) Default value is: '\0-\x1F\x7F' For ASCII only set value
90           $BADCHARS = '^\x20-\x7F'; Force numbers and upper case only
91           $BADCHARS = '^A-Z1-9';
92

FILES

94       ·   /usr/dict/web2
95
96       ·   /usr/dict/words
97
98       ·   /etc/passwd
99

SEE ALSO

101       See Data::Password::BasicCheck if you need only basic password
102       checking.  Other modules Data::Password::Common, Data::Password::Check,
103       Data::Password::Meter, Data::Password::Entropy and
104       String::Validator::Password
105

AUTHOR

107       Ariel Brosh (RIP), January 2002.
108
109       Oded S. Resnik, from April 2004.
110
112       Copyright (c) 2001 - 2014  Raz Information Systems Ltd.
113       <http://www.raz.co.il/>
114
115       This package is distributed under the same terms as Perl itself, see
116       the Artistic License on Perl's home page.
117
118
119
120perl v5.32.0                      2020-07-28                       Password(3)
Impressum