Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Perl to .htaccess file

Posted on 2003-03-26
5
Medium Priority
?
321 Views
Last Modified: 2010-03-04
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

0
Comment
Question by:cr8383942
  • 3
  • 2
5 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 8214087
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
0
 

Author Comment

by:cr8383942
ID: 8214362
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
0
 
LVL 48

Accepted Solution

by:
Tintin earned 300 total points
ID: 8214436
Whether the password is generated via htpasswd or crypt, the effective result will be the same.
0
 

Author Comment

by:cr8383942
ID: 8214526
thanks!
0
 
LVL 48

Expert Comment

by:Tintin
ID: 8214609
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
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question