Here' what I see in my debug log. Access Reject because of exit status 255 in Exec-Program-Wait and as I said nothing corresponding to the read variable i.e Calling-Station-Id.
--------------------------------------------------------------------------------------------------------------------------------------------- Fri Mar 7 16:38:39 2008 : Debug: rad_check_password: Found Auth-Type None Fri Mar 7 16:38:39 2008 : Debug: rad_check_password: Auth-Type = Accept, accepting the user Fri Mar 7 16:38:39 2008 : Debug: radius_xlat: '4444444444' : : n !!!!!!!!!!!!! THIS IS WHAT I MEANT( status "n" for SQL check) !!!!!!! Fri Mar 7 16:38:39 2008 : Debug: Exec-Program output: Fri Mar 7 16:38:39 2008 : Debug: Exec-Program: returned: 255 Fri Mar 7 16:38:39 2008 : Debug: Delaying request 0 for 1 seconds Fri Mar 7 16:38:39 2008 : Debug: Finished request 0 : Fri Mar 7 16:38:39 2008 : Debug: Going to the next request - Sending Access-Reject of id 63 to 10.1.1.1 port 1828 Reply-Message := "Valid Caller-Id, access granted -> 4444444444" --------------------------------------------------------------------------------------------------------------- On Fri, Mar 7, 2008 at 4:37 PM, rsg <[EMAIL PROTECTED]> wrote: > Well.. What I meant was I actually would like to call an environmental > variable as a variable in my simple perl script. > > Following "Attributes as environment variables in executed programs" > in variables.txt for instance I tried the below. > --------------------------------------- > #!/usr/bin/perl -w > use Mysql; > > $Check = $CALLING_STATION_ID; > > print STDERR "\t: $Check\n"; > > $db = Mysql->connect("localhost","radius","root",""); > $status = $db->Mysql::query("select if((select CallingStationId from > radcheck where CallingStationId='$Check' order by Id limit > 1),'y','n')"); > ($chk)= $status->FetchRow(); > print STDERR "\t: $chk\n"; > > if($chk eq 'n'){ > exit 255; > } > -------------------------------------------------- > > But I see nothing for the -> print STDERR "\t: $Check\n"; which should > ideally give the Calling-Station-Id. > > And the Sql check obviously gives "n". > > > P.S. In the context, I have nothing that I cannot share with you. So > my apologies if I sounded so, in my previous mail. > > Thanks for your help, > > > > > > > > On Fri, Mar 7, 2008 at 4:07 PM, Alan DeKok <[EMAIL PROTECTED]> wrote: > > rsg wrote: > > > I unsuccessfully attempted the options given by ../docs/variables.txt. > > > Please help with the correct syntax. > > > > Q: I won't tell you what I did, or what happened when I did it, but I > > need to know why it doesn't work. > > > > A: Damned if I know. > > > > Alan DeKok. > > - > > List info/subscribe/unsubscribe? See > http://www.freeradius.org/list/users.html > > > - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html