assign a value to an attribute via a script

Philippe Bacquaert philippe.bacquaert at laposte.net
Wed Apr 26 10:46:26 CEST 2006


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


Accédez au courrier électronique de La Poste : www.laposte.net ; 
3615 LAPOSTENET (0,34 €/mn) ; tél : 08 92 68 13 50 (0,34€/mn)







More information about the Freeradius-Users mailing list