Hi, While bypassing password Authentication based on the Calling-Station-Id, is there a way to still the Authentication to be handled by rlm_pap and rlm_chap ?
When "Exec-Program-Wait" is used, PAP/CHAP based authentication can still be performed by an external perl script. But that is not what I want to do. I want the rlm modules(PAP/CHAP) to handle the normal authentication while bypassing them only for selected caller-ids. Please advise. Regards, rg. On Fri, Mar 7, 2008 at 5:47 PM, Escobar, Emilio <[EMAIL PROTECTED]> wrote: > You still need to grab the value of that environment variable properly. Perl > uses the $ENV hash list to store all the environment variables. So for > example you'd have to use, $ENV{"CALLING_STATION_ID"}. > > Regards, > > Emilio > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of rsg > Sent: Friday, March 07, 2008 10:37 AM > To: FreeRadius users mailing list > Subject: Re: ENV variables in external scripts > > 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 > > - > List info/subscribe/unsubscribe? See > http://www.freeradius.org/list/users.html > - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html