Problem using exec module
Fernando Brito
fbrito at lq.com.ar
Tue Nov 15 18:04:07 CET 2005
Sorry, but I had tryed that out and it didn't work. In the second run of
the "authorize" section radiusd never touch the subsections, but my
guess is that the Autz-Type variable is always empty, even after running
the files module:
users file --------------------
DEFAULT Auth-Type := System, Realm == "wireless", Autz-Type := SQL1
DEFAULT Auth-Type := System, Realm == "dhcp", Autz-Type := SQL2
-------------------------------
radius.conf file --------------
authorize {
suffix
files
Autz-Type SQL1 {
sql1
}
Autz-Type SQL2 {
sql2
}
auth_log
}
-------------------------------
Bye and Thanks again!!
NanO
El mar, 15-11-2005 a las 08:42 +1100, Mitchell, Michael J escribió:
> Hi Nan0,
>
> The authorize section of radiusd.conf is actually run twice when an
> Access-Request is received by the server.
>
> The first time, Autz-Type is not set. During the first run through the
> authorize section, one of the modules may set Autz-Type, for example, a
> module may set Autz-Type to MY_AUTZ_TYPE.
>
> The second time through the authorize section only modules contained
> within the subsection defined by the Autz-Type variable will be run. eg:
>
> Autz-Type MY_AUTZ_TYPE {
> echo
> }
>
> Hope that helps,
> Mike
>
>
> > -----Original Message-----
> > From: freeradius-users-bounces at lists.freeradius.org
> > [mailto:freeradius-users-bounces at lists.freeradius.org]
> > Sent: Tuesday, 15 November 2005 8:38 AM
> > To: 'FreeRadius users mailing list'
> > Subject: Problem using exec module
> >
> > Hi, I'm trying to use the next exec module:
> >
> > radius.conf -------------------
> >
> > modules {
> > exec {
> > wait = yes
> > input_pairs = request
> > }
> > exec echo {
> > wait = yes
> > program = "/bin/echo %{Autz-Type}"
> > input_pairs = request
> > output_pairs = reply
> > }
> > }
> >
> > authorize {
> > suffix
> > echo
> > files
> > sql
> > auth_log
> > }
> >
> > -------------------------------
> >
> >
> > And the Radiusd gave me the next output:
> >
> > radiusd -X --------------------
> >
> > WARNING: Attempt to use unknown xlat function, or
> > non-existent attribute in string %{Autz-Type}
> > radius_xlat: '/bin/echo '
> > Exec-Program: /bin/echo
> > Exec-Program output:
> > Exec-Program-Wait: plaintext:
> > Exec-Program: returned: 0
> >
> > -------------------------------
> >
> >
> > I hope someone can help me. Thanks and bye,
> >
> >
> > NanO
> >
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
> >
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list