?
Solved

Perl to .htaccess file

Posted on 2003-03-26
5
Medium Priority
?
316 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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

765 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