Henk Boonstra > PWD-PwDigest-0.13 > PWD::PwDigest

Download:
PWD-PwDigest-0.13.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

PWD::PwDigest - Perl interface to edit the Apache .htpasswd file.

SYNOPSIS ^

 $user = "UserName";
 $nuser = "NewUserName";
 $pass = "PassWord";
 $realm = "Member Page";
 $passfile = "/www/members/.htpasswd";

 require PWD::PwDigest;

 # Return the line to add in the .htpasswd file for AuthType Digest.
 $pass = pwd_md5($user, $pass, $realm);

 # Add the user to the .htpasswd file for AuthType Digest.
 $add_pass = add_pwd_md5($user, $pass, $realm, $passfile);

 # Remove the user from the .htpasswd file for AuthType Digest.
 $rm_pass = rm_pwd_md5($user, $passfile);

 # Update the user in the .htpasswd file for AuthType Digest.
 $upd_pass = upd_pwd_md5($user, $nuser, $pass, $realm, $passfile);

 # Check for duplicate username for AuthType Digest.
 $dup_pass = dup_pwd_md5($user, $passfile);

DESCRIPTION ^

 $user = The username
 $nuser = The new username
 $pass = The password from the user
 $realm = The 'AuthName' in the .htaccess file
 $passfile = The password file where to store the passwords (.htpasswd)
syntax highlighting: