*This message was transferred with a trial version of CommuniGate(tm) Pro*
Asif:
> Let me tell u first, I am not a pro in Perl or CGIs. I would like to
> know whether anyone knows about any CGI/Perl scripts available to
> change passwords in the MySQL database.
I'm using mSQL (similar with MySQL, but less powerful) with radiator
2.14.1 too. Well the CGI I have were wrote by me. I sugest you do the
same thing. I'm not a Perl CGI pro neither, but is too easy to learn
perl to make cgi and other cool stuff (maybe this is one of the reasons
radiator was writen with). :)
there is a little example how to make a password change via CGI
#!/usr/bin/perl
use DBI;
use CGI;
q= new CGI;
$newpass = $q->param("newpassword");
$username = $q->param("loginname");
$dbhandler = DBI->connect('DBI:mSQL:radius')
or die "Couldn't make connection because: ".DBI->errstr;
# you will need also a password to access MySQL.
$sthandler = $dbhandler->prepare("UPDATE SUBSCRIBERS SET PASSWORD = ?
WHERE USERNAME = ?")
or die "Couldn't prepare query because: ".$dbh->errstr;
$sthandler->execute($newpass,$username);
$sthandler->finish;
$dbhandler->disconnect;
of course you have to receive via cgi post the loginname and the
newpassword variables from a html form.
> I think a brief introduction of the setup would be useful to u.. I am
> using Radiator 2.14 which interacts with MySQL database. In a table
> inside a MySQL database usernames and passwords are stored. We are
> running Apache webserver where I would like the CGI/Perl script to
> reside and work. And yes.. one more thing, if possible can this script
> have some kind of encryption, so that the username and passwords are
> encrypted during the transfer.
Well in Perl 5.003 (i'm not sure about older ones), there is a function
called crypt that receives a salt, a string and returns the string
encrypted with the salt (usually to alpha-numeric caracters). I think
this will be useful to you to acomplish the crypt task you need. In fact
radiator can receive either plain or ecrypted password to make the
authentication. It's up to you to realice what method to use.
> Any help on the above issue would be highly appreciated.
>
> Thanks in advance for your help..
hth
--
Sergio Gonzalez
Calle 100 #8A-55 Torre C oficina 711
[EMAIL PROTECTED]
NOC- SkyNet de Colombia.
(57) +1 6422020
(57) +3 2277871
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.