NAME
Mail::PopPwd - Perl 5 module to talk to a poppasswd daemon
SYNOPSIS
use Mail::PopPwd;
my $poppwd = Mail::PopPwd->new(
HOST => "localhost",
USER => "hdias",
OLDPWD => "********",
NEWPWD => "********");
my $error = $poppwd->change();
# set hash values
$poppwd->{HOST} = "localhost";
$poppwd->{USER} = "hdias";
$poppwd->{OLDPWD} = "********";
$poppwd->{NEWPWD} = "********";
DESCRIPTION
This module implements an Object-Oriented interface to a poppassd daemon. It can be used to write perl-based clients to change users password (you can use this for change passwords via www clients).
CONSTRUCTORS
Mail::POP3Client->new(
HOST => "local",
PORT => 106,
USER => "",
OLDPWD => "",
NEWPWD => "",
TIMEOUT => 0,
);
HOST is the poppassd daemon server name or IP address (default='localhost')
PORT is the poppassd daemon server port (default=106)
TIMEOUT set a timeout value for socket operations (default=0)
USER is the userID of the account on the poppassd daemon server
NAME is the name of the userID (for matching against the new password)
STOREDPWD is the cleartext stored password for the userID (if you use a database to store passwords)
OLDPWD is the cleartext old password for the userID
NEWPWD is the cleartext new password for the userID
CONFPWD is the cleartext confirmation password for the userID
NMIN is the minimum number of characters of password (default=6)
NMAX is the maximum number of characters of password (default=12)
NDIFCHARS is the number of differents characters in password (default=4)
NSEQWORD is the number of similar characters in NEWPWD and OLDPWD, USER or NAME
CRACKLIB is the location of your pw_dict file for use with cracklib module
METHODS
These commands are intended to make writing a poppassd client easier.
- new()
-
Construct a new connection with this. You should give it at least 4 arguments; HOST, USER, OLDPWD and NEWPWD. All others arguments are optional. All passwords are send in clear text.
- checkpwd()
-
Check password against given paramenters; STOREDPWD, NMIN, NMAX, NDIFCHARS, NSEQWORD and CRACKLIB if you set the path to the dictionary (check the password for their appearance in dictfile). Return a error code if the passwords are invalid.
- change()
-
Connect to poppasswd daemon and change the old password to the new password. Return a error if the connection fail.
ERROR CODES
- 551
-
USER empty
- 552
-
OLDPWD empty
- 553
-
NEWPWD empty
- 554
-
CONFPWD empty
- 555
-
length of NEWPWD lesser then NMIN
- 556
-
length of NEWPWD greater then NMAX
- 557
-
STOREDPWD and OLDPWD do not match
- 558
-
CONFPWD and NEWPWD do not match
- 559
-
The NEWPWD must have NDIFCHARS or more different characters.
- 560
-
The NEWPWD and OLDPWD is similar
- 561
-
The NEWPWD and USER is similar
- 562
-
The NEWPWD and NAME is similar
- 563
-
BAD PASSWORD: it is based on a dictionary word or to easy
AUTHOR
Henrique Dias <hdias@aesbuc.pt>
CREDITS
Based on poppassd by Pawel Krawczyk <kravietz@ceti.com.pl>, http://www.ceti.com.pl/~kravietz/prog.html
and
change-pass.cgi by mp@atlantic.net
Thanks to Anita Afonso for the revision.
SEE ALSO
perl(1).
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 218:
You forgot a '=back' before '=head1'