Creating htpasswd compatible passwords

Marty Knapp martyknapp at comcast.net
Sun Mar 22 06:55:49 EDT 2009


Thanks Matthias, Sarah and others. I'm going to be away from the office 
(and email) for a week, so I'll give this some more attention when I 
return. Perhaps there'll be some more input by then as well.


Marty
> Hi Marty,
>
> i was looking also for a solution some time ago. As far as i know, Revolution cannot create such passwords on without "external" help. Please anyone correct me, if i am wrong.
>
> For a customer i created an app, which helps him to create and protect folders. The complete app creates/modifies/deletes the .htacess and the .htpasswd files for him.
>
> This is how i solved the password creation:
>
> 1. I created  a php-file with the following content e.g:
> ______________
> <?php
> // set password
> echo "Password created";
> echo"<br>" ;
> echo crypt($pass , 'sa');
> //you can replaces ´sa´ with whatever 2 characters you want
>
> ?> 
> _____________________________
>
> This php file was put on the customers webserver.
>
>
> 2. the following lines call the php-script and passes the "real" text-password to the php, which then returns 2 lines. In the second line there is the encrypted password. To be sure, that the php was executed correctly, i check for "Password created" in line 1.
>
> ____________________________
>
> put URL ("http://www.revolutionatwork.com/passwordcreate.php?pass=" & sPassword) into sOutput  
> if line 1 of sOutput is "Password created"  
> then 
> put line 2 of sOutput into sEncryptedPassword
> _____________________________________________ 
>   




More information about the use-livecode mailing list