PDA

View Full Version : Automatic activation of password/username


Miss.R
26th September 2004, 10:23
I was wondering how to set up a similar kind of automatic activation for customers who register, just like when you register to use this forum, its all done automatically. Can anyone explain how to set it up?

We have some of our pages password protected but at moment we're struggling to keep up with all the registrations we received as we have to activate each username/password manually. So when people register then we log in to our password protected pages and enter the relevant username/password to be activated...........very time consuming and we get a number of registration everyday.

Can this be done automatically and straightforward? :huh:

Many thanks

Roger
26th September 2004, 23:23
I think if you look in the root directory you have when you FTP to your site, you will see a directory .htpasswds which will have one line per user and each line will have the username in clear, then a colon, then the password one-way encrypted. I wrote a program once to do something like this, but cannot immediately track it down (and I abandoned it when cPanel and Plesk automated what I wanted to do).

I do remember it was in Perl and included the Perl function crypt to encrypt the password. So you could write something to add the chosen username and encrypted password to the file. Whether the file permissions would let your user write the file I don't know, I kind of guess it might not. :(

If that is the case, you might get round it by modifying the .htaccess file in the protected directory to point to a directory where you can update the file (but this had better be a directory that isn't visible from the web, for security's sake).

This bulletin board uses a different password protection mechanism to that described above.

Roger