Forum Moderators: phranque
Has anyone done this before?
Thanks in advance for your help!
Wes
If you're using PHP, you could open the passwd file and modify it based on user input. Just make sure the file has the right permissions.
I'd have thought a better solution would be to store usernames and passwords in some kind of database backend (MySQL, pgsql, ...), rather than in a flat apache passwd file. That way you can extend what is stored - e.g. user preferences / user tracking / ...
apache2-mod_auth_mysql could be your friend in this situation if you're determined to have basic authentication rather than form authentication.