Re: Unable to authenticate freeradius using PostgreSQL



On Wednesday 29 November 2006 05:52, Ross McOwat wrote:
> radius_xlat:  'SELECT id, UserName, Attribute, Value, Op
> #?authorize_check_query = '
> rlm_sql (sql): Reserving sql socket id: 4
> rlm_sql_postgresql: query: SELECT id, UserName, Attribute, Value, Op
> #?authorize_check_query =
> rlm_sql_postgresql: Status: PGRES_FATAL_ERROR

radius_xlat now shows the query, but "SELECT id, UserName, Attribute, Value, 
Op" is not a valid SQL query.  The "authorize_check_query" being listed in 
the radius_xlat line means that you haven't properly quoted the SQL query in 
the config file.  Look at the default postgresql.conf to see what you're 
missing... paying close attention to quotation marks.

> I have changed the 'value' and 'op' columns around, as the
> authentication sql query within postgresql.conf appears to try and
> retrieve 'value' before 'op'.  Using the supplied database schema, the
> op column appears BEFORE value.  Not sure if this is significant or not?
> Or possibly the actual data format I've entered is incorrect?  I suspect
> (hope) it's something as simple as that.

It doesn't matter how the table columns are arranged, as long as your query 
asks for them in the correct order.

Kevin Bonner

Attachment: pgpf44WAnLBx5.pgp
Description: PGP signature



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