Could unlang be used check Calling-station-Id for instance, from an SQL backend?
2008/4/10 Ivan Kalik [EMAIL PROTECTED]:
You use unlang for that. Read man unlang.
Ivan Kalik
Kalik Informatika ISP
Dana 10/4/2008, rsg [EMAIL PROTECTED] piše:
Hi,
After a brief review of the
Sorry,
I guess it should be in the following format
%{sql:SELECT ...
However as of now lengthy query won't be supported??
2008/4/16 rsg [EMAIL PROTECTED]:
Could unlang be used check Calling-station-Id for instance, from an SQL
backend?
2008/4/10 Ivan Kalik [EMAIL PROTECTED]:
You
No. Use it to bypass chap.
http://www.freeradius.org/radiusd/man/unlang.html
Ivan Kalik
Kalik Informatika ISP
Dana 16/4/2008, rsg [EMAIL PROTECTED] piše:
Could unlang be used check Calling-station-Id for instance, from an SQL
backend?
2008/4/10 Ivan Kalik [EMAIL PROTECTED]:
You use unlang
Yes, that works well. Many thanks.
In fact by changing the logic slightly you can achieve the required
functionality fairly easily.
e.g. changing the UserID/Password upon radius_request such that
corresponding policies can be applied based on the modified UserName.
rg.
2008/4/16 Ivan Kalik
Hi,
Hi,
After a brief review of the logic, i managed to get it working. My
apologies for the trouble and thank you for your time.
rlm_perl related question once again:
When performing credential based Auth, how could I simply fall-though
to the next check when there isn't a match.
Hi,
My next query is when I tried to retrieve the CallerId from a Mysql DB
using the same perl script with,
-
use Mysql;
:
:
$status = $db-Mysql::query(SELECT IF(EXISTS(SELECT callerid FROM
auth WHERE callerid='$RAD_REQUEST{/'Calling-Station-Id'/}'),'y','n'));
your escape
Hi,
I attempted setting it to a local variable as well.
Result was the same.
Thanks so much for your suggestions guidance. It's really appreciated.
On Thu, Apr 10, 2008 at 1:02 PM, [EMAIL PROTECTED] wrote:
Hi,
My next query is when I tried to retrieve the CallerId from a Mysql DB
$myvalue = $RAD_REQUEST{'Calling-Station-Id'};
# Print it or check in some other way
$myquery = SELECT IF(EXISTS(SELECT callerid FROM auth WHERE
callerid=' . $myvalue . '),'y','n');
# Now print or check in some other way the query to see if it is joined
well
$yourquery = SELECT IF(EXISTS(SELECT
Hi,
After a brief review of the logic, i managed to get it working. My
apologies for the trouble and thank you for your time.
rlm_perl related question once again:
When performing credential based Auth, how could I simply fall-though
to the next check when there isn't a match.
With
You use unlang for that. Read man unlang.
Ivan Kalik
Kalik Informatika ISP
Dana 10/4/2008, rsg [EMAIL PROTECTED] piše:
Hi,
After a brief review of the logic, i managed to get it working. My
apologies for the trouble and thank you for your time.
rlm_perl related question once again:
When
Hi,
Thanks a lot for the suggestion. I have a few more queries with regard
to rlm_perl integration.
When this module is used for Calling-Station-Id based auth, would it
be independent of whether it is CHAP or PAP.
I tried with
../users
DEFAULT Auth-Type = perl
Fall-Through = 1
What freeradius version? I don't think that you can bypass chap in 1.1.x
but it can be done in 2.0 with unlang. pap is listed last, so it will be
bypassed in both versions.
Ivan Kalik
Kalik Informatika ISP
Dana 9/4/2008, rsg [EMAIL PROTECTED] piše:
Hi,
Thanks a lot for the suggestion. I have
Hi,
it's 1.1.7
If this cannot bypass CHAP, will have to do it using the same perl script then.
My next query is when I tried to retrieve the CallerId from a Mysql DB
using the same perl script with,
-
use Mysql;
:
:
$status = $db-Mysql::query(SELECT IF(EXISTS(SELECT callerid FROM
auth
Subject: Re: ENV variables in external scripts
Hi,
it's 1.1.7
If this cannot bypass CHAP, will have to do it using the same perl script
then.
My next query is when I tried to retrieve the CallerId from a Mysql DB using
the same perl script with,
-
use Mysql;
:
:
$status = $db-Mysql
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
With rlm_perl can external perl scripts be easily used as with
Exec-Program-Wait ?
Easier:
http://wiki.freeradius.org/Rlm_perl
Ivan Kalik
Kalik Informatika ISP
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
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
: 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
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
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
Hi,
I need to check an environmental varible with an external script.
For example to capture Calling-Station-Id and check it in an external
database using a perl script
# ../users
:
.
DEFAULT Auth-Type = None
Exec-Program-Wait = /root/check.pl %i,
Reply-Message := Valid
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?
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
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.
] 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
rsg wrote:
$Check = $CALLING_STATION_ID;
Read the Perl documentation.
print STDERR \t: $Check\n;
Don't do this. Executed programs should print to STDOUT. They should
NOT print to STDERR.
$db = Mysql-connect(localhost,radius,root,);
...
print STDERR \t: $chk\n;
...
And the Sql check
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
On Fri, Mar 7, 2008 at 5:22 PM, Alan DeKok [EMAIL PROTECTED] wrote:
Read the Perl documentation.
Thanks for the advice.
print STDERR \t: $Check\n;
Don't do this. Executed programs should print to STDOUT. They should
NOT print to STDERR.
Would like to know why? Thanks in advance
28 matches
Mail list logo