Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 1996 17:42:40 -0700
From:      ims@bcgrizzly.com (Ed Imhoff)
To:        kelly@fsl.noaa.gov
Cc:        questions@freebsd.org
Subject:   Re: Forwarded mail....
Message-ID:  <199606010042.RAA21923@kodiak.bcgrizzly.com>

next in thread | raw e-mail | index | archive | help


>    Ed> via WWW interface.  How do I create a form that authenticates
>    Ed> a user???
>
>In C, look up the user's password entry with getpwent(3), then get the
>password salt from the pw_passwd field and pass that along with the
>typed password to crypt(3).  Compare the result to the pw_passwd field
>with strcmp(3).  If it's identical, authenticate.  If not, punt 'em
>out.

Can you give me an example of how I'd do this?  I'm a student learning 
how to code HTML.  The project is to create a form that checks if a user
is valid.  It then returns output from a script that details his time used
online.  Right now I'm only interested in getting the HTML coded, and I need
to find a way to authenticate the user.

>
>The perl solution is similar and is left as an exercise.  :-)
PERL script would prolly work for me better as well.>

>See /usr/src/usr.bin/login/login.c for sample code.

This didn't help me much, I'm not a C guy :(





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606010042.RAA21923>