Click to See Complete Forum and Search --> : Passwords, logins and such


DJRobThaMan
07-11-2003, 03:57 PM
What's up,
I'm not all that great when it comes to CGI and perl but I can fumble around and I've been trying to figure out how to create a CGI script that allows people to log in to certain areas of a web site and have their passwords and all that and I've thought of a few ways but none of them sounded very secure. First I thought maybe create a text file that has all the usernames and passwords and everytime someone tries to log on split the whole file and take the word after the username as the password and if that word equals the one given then let them in but this didn't seem either secure or quick (especially if there are a lot of users).

So does anyone have better ideas or know where I can find some?


Lata

Scriptage
07-11-2003, 09:35 PM
look in to .htaccess files, if your server allows them, its the most secure way of user control.
if you use pure CGI then its gonna get nasty when it comes to making directories read only by the server, because if you want users to access files then you're gonna have to get throuh a CGI script and its not a good way to do it really (tried it and its messy). So just go to google.com and search for .htaccess tutorials and you'll have it protected in minutes.
Regards

DJRobThaMan
07-11-2003, 11:44 PM
Thanks a lot. I'll definitely check that out.