Help with encrypt password and uid.

This is a discussion on Help with encrypt password and uid. within the Linux Web Servers forums, part of the Web Server and Related Forums category; Now I want to write one CGI(Perl) program. User will login to a web page, and have to enter ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-03-2003
Franklin Lee
 
Posts: n/a
Default Help with encrypt password and uid.

Now I want to write one CGI(Perl) program.

User will login to a web page, and have to enter a user id and
password(Inlcuding registering). And submit to Server.

Then I need encrypt the UID and password. In server, I get the encrypted msg
and then decode the msg to get
UID and password.

How should I do? Is there some document for this?

Thank you!

Franklin



  #2 (permalink)  
Old 11-03-2003
David Efflandt
 
Posts: n/a
Default Re: Help with encrypt password and uid.

On Mon, 3 Nov 2003 10:09:46 +0800, Franklin Lee <pengtaoli@hotmail.com> wrote:
> Now I want to write one CGI(Perl) program.
>
> User will login to a web page, and have to enter a user id and
> password(Inlcuding registering). And submit to Server.
>
> Then I need encrypt the UID and password. In server, I get the encrypted msg
> and then decode the msg to get
> UID and password.
>
> How should I do? Is there some document for this?


Typically for Unix system passwords, or apache auth, the unique username
is stored in plain text and the initial plain text password is crypted for
storage (using the system crypt function, which should use random salt
within the specified character range). This is a one way crypt, so
there is no decoding. See 'perldoc crypt' and 'man crypt'. The fields
are colon separated as follows for apache auth (second colon or anything
after it optional).

username:crypted_passwd:optional_ignored_comment

To tell if a user supplied password is valid, the user supplied plaintext
password used for authentication is crypted using the crypted password for
salt, and if the result matches the crypted password, it is good. If not,
it is bad. Or if you configure apache to use that file for web
authentication, that is handled by apache automatically.

See HTTPD::UserAdmin at http://search.cpan.org/modlist/World_Wide_Web

--
David Efflandt - All spam ignored http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:06 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0