Ok, I found the problem.

The problem was the operator in radcheck I put '==' instead of ':='...

Sorry for the inconvenience.

Bastien Semene
Administrateur Réseau & Système

Cyanide Studio - FRANCE

Le 06/07/2011 15:26, Bastien Semene a écrit :
Hi list,

I have problem authenticating users against (My)SQL.
Freeradius is running on a FreeBSD 8.0-STABLE and is on version 2.1.10.

It is a fresh install that I made work with the default file authentication.
When I connect the SQL backend, it doesn't work.
I followed the instructions on the FreeRADIUS wiki : http://wiki.freeradius.org/SQl_HOWTO

The SQL module is correctly loaded and it returns an OK during authentication.
The queries are well formed and the results should be ok

What I don't understand is why sql module returns OK, and the authentication is rejected. In my mind, an OK from the SQL module at this step means it has authenticated the user.
Am I misunderstanding ?

The debug output and relevant configuration directives are below.

P.S. : 10.1.8.4 is the IP of the server, I'm running radtest commands from this host (I can't use 127.0.0.1 because of how network currently works in jails on FreeBSD).


Here is the output of the radtest command :

# radtest bsemene test 10.1.8.4 0 "password for jail client"
Sending Access-Request of id 214 to 10.1.8.4 port 1812
        User-Name = "bsemene"
        User-Password = "test"
        NAS-IP-Address = 10.1.8.4
        NAS-Port = 0
rad_recv: Access-Reject packet from host 10.1.8.4 port 1812, id=214, length=20




H
-- 

If you think experts are expensive,
wait to see what amateurs will cost you
--
Bastien Semene
Administrateur Réseau & Système

Cyanide Studio - FRANCE