Link to home
Start Free TrialLog in
Avatar of cr8383942
cr8383942

asked on

Perl to .htaccess file

I want to control Apache directory access via a perl script. I know normally users are added to an htaccess file using htpasswd, but if I want open and add user with proper encryption, can i do this? Do I use the crypt() function?

thanks!
CR

Avatar of Tintin
Tintin

Define what you mean by "proper encryption"

If crypt is available on your system you can use it to create a password that is eqivalent to what htpasswd does.

perldoc -f crypt
Avatar of cr8383942

ASKER

No -- as long as I can create an access file that Apache can use, I'm happy. So Apache isn't bothered by the encryption used by crypt?
-CR
ASKER CERTIFIED SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks!
You may well just find it easier to use the Apache::Htpasswd module

http://search.cpan.org/author/KMELTZ/Apache-Htpasswd-1.5.5/Htpasswd.pm