Re: assign a value to an attribute via a script




----- Original Message ----- From: "Philippe Bacquaert" <philippe.bacquaert@laposte.net>
To: "freeradius-users" <freeradius-users@lists.freeradius.org>
Sent: Wednesday, April 26, 2006 10:46 AM
Subject: assign a value to an attribute via a script


Hello,

I'm searching how to use a script to modify the value of an
attribute.

When I try the example of radiusd.conf : Attribute-Name =
`%{echo:/path/to/program args}`

In my test I try to use a script to assign an IP address to
the Attribute Framed-IP-Address :
Framed-IP-Address = `%{dhcp:/etc/raddb/test %{User-Name}
%{NAS-IP-Address}}`

I've added this in the accounting module with the same result
as I want to fic this value in the attribute Framed-IP-Address
during the time of an active accounting session.

I've created an exec module :
exec dhcp {
wait = yes
input_pairs = request
output_pairs = reply
packet_type = Access-Accept
}

I get an error message when I try to start :
ERROR: Cannot find a configuration entry for module
"Framed-IP-Address".

The rest of the radiusd.conf configuration is pointing to a
MySQL database and works well.

I've tested successfully the script itself alone in the echo
module configuration : program = "/var/log/radius/test
%{User-Name} %{NAS-IP-Address}"

What am I doing wrong ?
Is something missing ?

Sincerely,
Philippe BACQUAERT

If you want to assign fixed ip address to a user add FramedIPAddress field into radreply table for that user?




This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.