Hi,
I am in a little trouble about how to administrate a password protected foder.
I have created a protected folder using the following format:
i. A .htaccess file with format:
AuthUserFile /etc/chivideo.pwd
AuthGroupFile /etc/chivideo.grp
AuthName "Enter Your Password"
AuthType Basic
<Limit GET>
require group chilideousers
</Limit>
ii. A password file ~/etc/passwords.pwd with the users and their passwords, one per line.
iii. A group file ~/etc/group.grp with the user names, all on one line.
And is ok.
My trouble is that I need to find a way to add users and passwords to "password.pwd" file trought a PHP script.
I have tested that is impossibile to use htpasswd and pass data to that file, so the last way I have find is to add records to the passwords file that should be not a problem... but...what about the data encryption used by Unix System ?
How can I encrypt the passoword in the same way Unix does ?
Did you know any easier ways to get the same result ?
As I say I need to be able to add and remove users from the password.pwd file from an user friendly web page and it is not possible to protect web pages only because I need to put some files avaible for download inside the folder...
than you for your help.
Fabio