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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl and Apache Configuration Files
by arhuman (Vicar) on Jan 07, 2002 at 18:53 UTC | |
by newrisedesigns (Curate) on Jan 07, 2002 at 20:51 UTC | |
by BazB (Priest) on Jan 07, 2002 at 21:29 UTC | |
by newrisedesigns (Curate) on Jan 07, 2002 at 21:50 UTC | |
|
Re: Perl and Apache Configuration Files
by rob_au (Abbot) on Jan 08, 2002 at 04:01 UTC | |
|
Re: Perl and Apache Configuration Files
by Anonymous Monk on Jan 08, 2002 at 00:38 UTC | |
|
Re: Perl and Apache Configuration Files
by newrisedesigns (Curate) on Jan 08, 2002 at 19:20 UTC |