WE::Util::Htpasswd - create apache .htpasswd files from a user database
use WE::Util::Htpasswd; WE::Util::Htpasswd::create("/var/www/.htpasswd", $complex_user_db);
Create apache .htpasswd files from a WE_Framework user database.
.htpasswd
Create the .htpasswd as $dest_file from the (complex) user database object $user_db. Note that the user database should use the "none" CryptMode (that is, store plain text passwords).
$dest_file
$user_db
CryptMode
Add the entry for a user to the .htpasswd file $dest_file. The user object should be a WE::UserObj object as created in WE::DB::ComplexUser.
WE::UserObj
WE::DB::ComplexUser
Return a string of invalid characters for htpasswd usernames. This is handy for using in ComplexUser:
ComplexUser
new WE::DB::ComplexUser(..., ..., -crypt => "none", -invalidchars => WE::Util::Htpasswd::invalid_chars(), -invalidgroupchars => WE::Util::Htgroup::invalid_chars())
Maybe optionally use Apache::Htpasswd from CPAN to create .htpasswd. This would be handy if htpasswd is not available.
Slaven Rezic - slaven@rezic.de
htpasswd(1), WE::DB::ComplexUser, WE::Util::Htgroup, WE::Util::Htaccess.
To install WE::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WE::DB
CPAN shell
perl -MCPAN -e shell install WE::DB
For more information on module installation, please visit the detailed CPAN module installation guide.