Minimal Exec Example

Sky skydiablo at gmx.net
Fri Sep 22 15:44:14 CEST 2017


hi there,

im stuck in configure a simple "exec" solution. my site config looks
like this:

//================ START ================
authorize{
#    exec
     update control {
         Auth-Type := `/usr/bin/php -f /foo/bar/baz.php --username
'%{User-Name}' --password '%{User-Password}' --ip '%{Client-IP-Address}'`
     }
}
//================ END ================

so this works fine, i get the params and can handle this request. my
php-script std-out response looks like this:

//================ START ================
Accept
WISPr-Bandwidth-Max-Up = xxx
WISPr-Bandwidth-Max-Down = xxx
WISPr-Redirection-URL = http://google.com
//================ END ================

to test this configure, i try with CLI:

//================ START ================
$ radtest foo bar localhost 0 testing123
Sending Access-Request of id 145 to 127.0.0.1 port 1812
         User-Name = "foo"
         User-Password = "bar"
         NAS-IP-Address = 127.0.1.1
         NAS-Port = 0
         Message-Authenticator = 0x00000000000000000000000000000000
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=145,
length=20
//================ END ================

but i cant see any additinal response attributes, so what sould i do?
any suggestions?

Greez & thx, volker...



More information about the Freeradius-Users mailing list