This is the script to delete a session in the particular port. It it working fine
in web interface but after deleting the session web page has to refresh. While
refreshing the page shows a error that there is no data in the  page.  There is no
error shown in the log file.

# if the action is delete it will satisfy the condition and will go thru following
lines.
if ($input{action} eq 'Delete')
{
    my ($nas_id, $nas_port) = split(':', $input{session});
    &delete_session($nas_id, $nas_port);
}
elsif ($input{action} eq 'Terminate')
{
    # Force the NAS to terminate the session
    my ($name, $nas_id, $nas_port) = split(':', $input{session});
    &terminate_session($name, $nas_id, $nas_port);
}
sleep(2);
&show_sessions();


sub show_sessions
{
    if ($sessionTerminateProg)
    {
        $sesstermmessage = "<br>Click on \"terminate session\" to kick
a user off the NAS.";
    }
    my $done_at = scalar localtime(time);
    my $refresh;
    $url='http://www.myurl.com/cgi-bin/radwho.cgi.tmp';
    $refresh = "<meta http-equiv=\"Refresh\"
content=\"$refresh_time;url=$url\">"
        if $refresh_time;

        print <<EOF;
}
# Remove the indicated session from the database



sub terminate_session
{
    my ($name, $nas_id, $nas_port) = @_;

    if ($sessionTerminateProg)
    {
        #system("$sessionTerminateProg $nas_id $nas_port $name");
        use Net::Telnet ();
        $t = new Net::Telnet (Timeout =>20);
        $t->open("$nas_id");
        $t->login("!root","myscret");
        $t->cmd("reset s$nas_port");
        # print @lines
        $t->cmd(exit);
        # Prob should check exit status here
        # Wait for a little, gives the session a chance to end and for
        # Radiator to remove the sess from the database
        sleep(2);
   }
}

# After this is run it has to come back to the show session procedure but while
comming back it shows error that no data on the page.

Thanking you in anticipation.

Deepesh







Hugh Irvine wrote:

> Hello Deepesh -
>
> On Sun, 06 Aug 2000, Deepesh Singh wrote:
> > Can anybody help us.....   We were trying to impliment the web interface
> >
> > for the monitoring of the user's info for radius and was trying to
> > implement the session delete and session terminate but while terminating
> >
> > the user by telnetting into NAS and resetting the port the web page has
> > to refresh but it does disconnect the user but it doesn't come back to
> > same page it gives error as no data in the page and while checking the
> > error log it gives error as header error...
> >
>
> We will need to see the errors that are listed to be able to understand what is
> happening. Please send us a copy of the errors that you see.
>
> thanks
>
> Hugh
>
> --
> Radiator: the most portable, flexible and configurable RADIUS server
> anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
> Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
> Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.


===
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.

Reply via email to