Exec problems in FR3.0

Franks Andy (RLZ) IT Systems Engineer Andy.Franks at sath.nhs.uk
Thu Jun 13 17:24:27 CEST 2013

Sorry to send yet more emails with issues. I've moved to FR3 to test SQL
stuff and am having some problems with getting exec modules I previously
used to work. I know I could rewrite these in perl, but they worked
before in FR2.2.1 and I want to solve why they won't work now.

I have an exec module thus :

exec mactodelimitedmac {
        wait = yes
        input_pairs = config
        output_pairs = config
        shell_escape = yes
        program = "/usr/local/etc/raddb/mactodelimitedmac.sh
%{User-Name} :"

It just takes a mac address and adds a delimited to each component of
the address, updating the control value "DelimitedMac" via the standard 
echo Variable := \"value\""

I used to instantiate it in radiusd.conf and then call it directly from,
say, the post-auth section
Which updated that value.

If I do it that way now it gives : 
(0) WARNING: mactodelimitedmac : List "<INVALID>" is not available
LITERAL: %{User-Name}
LITERAL: %{User-Name} --> %{User-Name}
EXPANSION: %{User-Name}
Looking for attribute name in User-Name
xlat aprint 3
expand attr User-Name --> '0023ae604b02'
(0) mactodelimitedmac :         expand: '%{User-Name}' -> '0023ae604b02'
(0) mactodelimitedmac : Program output is
(0) ERROR: mactodelimitedmac : Abnormal child exit: Success
(0)   [mactodelimitedmac] = reject
(0) Using Post-Auth-Type Reject

If I instead do
Update control {
  DelimitedMac :=
"%{mactodelimitedmac:/etc/freeradius/mactodelimitedmac.sh %{user-name}
And change the script so that it just returns the bare variable it says

expand mod mactodelimitedmac -->
'/usr/local/etc/raddb/mactodelimitedmac.sh 0023ae604b02 :'
(0) Executing /usr/local/etc/raddb/mactodelimitedmac.sh 0023ae604b02 :
(0) Program output is ?[1m?[33m(0) WARNING: Failed to execute
/usr/local/etc/raddb/mactodelimitedmac.sh: Bad address?[0m
(0) ERROR: Child returned error 1
(0) result 1 --> '?[1m?[33m(0) WARNING: Failed to execute
/usr/local/etc/raddb/mactodelimitedmac.sh: Bad address?[0m '

Again, I'm struggling. Sorry to be a pain.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130613/7f3d60e4/attachment-0001.html>

More information about the Freeradius-Users mailing list