basic external freeradius auth example
tested against freeradius version: 2.1.10
/etc/freeradius/users
DEFAULT Auth-Type = Accept
Exec-Program-Wait = "/usr/local/bin/fradiusauth.py %{User-Name} '%{User-Password}' %{Calling-Station-Id} %{NAS-IP-Address} %{Framed-Protocol}",
Fall-Through = Yes
chasemp
/etc/freeradius/clients.conf
client 127.0.0.1 {
secret = radsecret
shortname = myhost
nastype = other
}
git clone https://github.com/chasemp/py-radius.git
cd py-radius
python setup.py install
OK
libradclient.py 127.0.0.1 radsecret chasemp 1234
chasemp authenticated
FAIL
libradclient.py 127.0.0.1 radsecret chasemp foo
Authentication Failed