Password and user id determines place to go

Is there a way to have a file that has the users id and password and their personal page, so that when they enter their password and id, it takes them to that page?
What I'm trying to do is have the user log in with their password and it take them to their personal page, but I also have another part that allows me to add and remove their passwd and id's straight from the web. I can do one or the other, but not both at the same time. Can anyone help?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sounds doable... not sure what system or what kinda cgi you would want but here's a my first thought about how I would do it...

use .htaccess to ask for user/pass and when accepted load a page with would do a redirect to there correct page bassed on the username. If you enter your username goto your page which would have a "change usernames and passes" link to a page that allows those changes.

One problem is that I'm not sure what would happen if you tried to edit the .htaccess and password file directly from the script. might cause problems if someone accessed that web at that exact time so you might have to handle the asking for the username and pass in a form and the script having it's own user/pass file(s).

questions: what cgi scripting do you want to use? perl? shell script? c++? dos batch? ;)

I just play with cgi myself and have very little load on my server so I'm not sure what kinda problems you would have if lots of people try to access at the same time with the above ideas,
KennyIT Application ExecutiveCommented:
If you do it that way, what is there to stop someone from keying in another person's username file in the location box of the brower?

e.g. I key-in\kelliwork.htm, it would open your html file. Just a thought.
well the .htaccess would not allow that.
if .htaccess was in the\users\ directory and don right, you can't access any page, even directly, without using user/pass.

As for uring user/pass via form can be done fully via cgi. So the url will always look like\cgi-bin\
I am assuming that you know how to generate the form that asks for the user name and password.

Now, just have a perl script that opens a file containing the user names and passwords, I would use something like:

dbmopen(users,"users",0644); #the hash with user name as key and
                 #password as the value
if ($users{$usernameEntered} eq $passwordEntered) #if matches
  {$file2open=$usernameEntered . ".lmth"} #then page is his name
  {$file2open="noSuch.html"} #otherwise error
open(FILE,$file2open); #open what we want to send to him
print "Content-type: text/html\n\n"; #so the server knows to send

while (<FILE>) {print} #copy the page to the user
close (FILE); #we copied it
dbmclose(users); #we are done with the file

Note, I named the pages with the username.lmth not html, I did this so that a knoweledgeable user can not just enter the url knowing the user name and get there without entering the user name and password.

Now, you just make a little editor to allow you to add users to the file.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kelliworkAuthor Commented:
Thanks for your help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.