There's more than one way to do things | |
PerlMonks |
Perl and Apache Configuration Filesby newrisedesigns (Curate) |
on Jan 07, 2002 at 18:49 UTC ( [id://136832]=perlquestion: print w/replies, xml ) | Need Help?? |
newrisedesigns has asked for the wisdom of the Perl Monks concerning the following question: Hi all, After attempting to work on a CGI program that would allow me to set .htaccess and .htpasswd files remotely through a secure form, I hit a snag. Writing the .htaccess files were no problem, however, I was a bit stuck when it came to .htpasswd. .htpasswd files are in username:password format, with the first two letters of the password being the salt that you would use in Perl's crypt function. When htpasswd generates a file, however, it seems that the salt is random. I tried using HTTPD::UserAgent (found out about it here), but it's not installed on this server, and I don't have the ability to install it (I don't even have telnet/SSH access :( just FTP.) If the .htpasswd files do use a random salt, would it be worthwhile to have perl generate the .htpasswd file or should (if it's possible) I pass the information to htpasswd through a pipe (last resort)? Thanks in advance for your help.
Back to
Seekers of Perl Wisdom
|
|