Hi,

Right now I am a little lost myself.

Trying to use crypt() to encrypt a given password.
I know how to compare a given password with an encrypted one, but to encrypt one
myself and save it, doesn't work for me for some reason.
You would say, Ah of course forgotten to give your encryption key. That's right
which one uses apache/Unix/etc ??

So what it is all about probably is this :

 my $crpw = crypt("$pw", "What key ????");

Hope for your help !

Regs David


For giving you the overview, here is my program :

#!/usr/bin/perl

use CGI qw(:standard);
use strict;

print header,
        start_html(-Title =>"Create external user", -BGCOLOR=>"#99cccc"),
        h1('Create external user'),
        start_form, table,
        Tr(td("Please enter userid"), td(textfield('userid') )),p,
        Tr(td("Please enter password"), td(password_field('pw') )),p,
        Tr(td("Please select group"), td(popup_menu('group', [ qw(iclab Philips All) 
]) )),p,
        Tr(td(submit(-Value =>"Create")));
print "</table>";
print end_form;


if (param('pw')) {

  my $pw = param('pw');
  my $userid = param('userid');
  my $group = param('group');

  my $crpw = crypt($pw);
  my $pwline = "${userid}:${crpw}";

  print $pwline;

}

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to