authenticate a password (webmin)

Discussion in 'Perl Misc' started by Jack, Nov 18, 2004.

  1. Jack

    Jack Guest

    Hi,

    After have looked into the login code in webmin, I don't understand its
    password authentication in the session_login.cgi file.

    The session_login.cgi file written with the following codes:

    print "$text{'session_prefix'}\n";
    print "<form action=$gconfig{'webprefix'}/session_login.cgi
    method=post>\n";
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print "<input type=hidden name=page
    value='".&html_escape($in{'page'})."'>\n";
    print "<table border width=40%>\n";
    print "<tr $tb> <td><b>$text{'session_header'}</b></td> </tr>\n";
    print "<tr $cb> <td align=center><table cellpadding=3>\n";
    if ($gconfig{'realname'}) {
    $host = &get_system_hostname();
    }
    else {
    $host = $ENV{'HTTP_HOST'};
    $host =~ s/:\d+//g;
    $host = &html_escape($host);
    }
    print "<tr> <td colspan=2 align=center>",
    &text($gconfig{'nohostname'} ? 'session_mesg2' :
    $gconfig{'usermin'} ? 'session_mesg3' : 'session_mesg',
    "<tt>$host</tt>"),"</td> </tr>\n";
    print "<tr> <td><b>$text{'session_user'}</b></td>\n";
    print "<td><input name=user size=20
    value='".&html_escape($in{'failed'})."'></td> </tr>\n";
    print "<tr> <td><b>$text{'session_pass'}</b></td>\n";
    print "<td><input name=pass size=20 type=password></td> </tr>\n";
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print "<tr> <td colspan=2 align=center><input type=submit
    value='$text{'session_login'}'>\n";

    ================ end of attachement =================

    The password is submitted to the session_login.cgi file, but there is no
    perl code in the session_login.cgi file validate the password.

    Does anyone know how does session_login.cgi in webmin validate the password?

    I need to change the login module in webmin so that it has an option
    allow to enter Cyrus user name and password as well when creating new
    user. When this admin user login, it also login Cyrus admin server and
    somehow pass the reference of cyrus to another cyrus module, from there,
    the admin user can also manage email user accounts as well.

    Thanks
    Sam
     
    Jack, Nov 18, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sam

    python module in webmin

    sam, Jan 27, 2005, in forum: Python
    Replies:
    1
    Views:
    418
  2. AAaron123
    Replies:
    2
    Views:
    2,363
    AAaron123
    Jan 16, 2009
  3. ghiggia

    Rails webmin like application

    ghiggia, Oct 13, 2006, in forum: Ruby
    Replies:
    0
    Views:
    226
    ghiggia
    Oct 13, 2006
  4. sam
    Replies:
    2
    Views:
    100
    Sherm Pendley
    Feb 10, 2005
  5. ponga
    Replies:
    0
    Views:
    91
    ponga
    Jun 4, 2005
Loading...

Share This Page