Informix error in "id" field ?
Hi all! 1. I have freeradius v3.0.12, iodbc and informix database. 2. In informix i have tables - "accounts" with users logins and "acct_details" with passwords. 3. One user (login) can have 2 or more passwords in "acct_details" table. 4. Fields in tables: ...accounts... - fscontrol VARCHAR (64) NOT NULL, - this is username ...acct_details... - fiacct_dtl_id SERIAL, - fspassword VARCHAR(64)NOT NULL, 5. My radcheck_query: authorize_check_query = "\ SELECT p.fiacct_dtl_id id, '%{SQL-User-Name}' username, \ 'Cleartext-Password' attribute, trim(p.fspassword) value,':=' op \ FROM accounts a inner join acct_details p on a.fiaccount_id = \ p.fiaccount_id \ WHERE a.fscontrol = '%{SQL-User-Name}'" 6. In debug i see: Debug: (2) pppoe: Executing select query: SELECT p.fiacc_dtl_id id, '0015w' username, 'Cleartext-Password' attribute, trim(p.fspassword) value, ':=' op FROM accounts a inner join acct_details p on a.fiaccount_id = p.fiaccount_id WHERE a.fscontrol = '0015w' ERROR: (2) pppoe: Invalid op "??s???" for attribute ??s??? ERROR: (2) pppoe: Error parsing user data from database result ERROR: (2) pppoe: Error getting check attributes Debug: rlm_sql (pppoe): Released connection (3) Debug: (2) modsingle[authorize]: returned from pppoe (rlm_sql) Debug: (2) [pppoe] = fail Debug: (2) } # authorize = fail In informix cli i see next result for query: "id" ; username ; attribute ; value ; op "2567890"; 0015w ; Cleartext-Password ; password ; := 7. If replace "p.fiacct_dtl_id id" on "1 id" in query, then everything work fine. Where can be the problem?
On Jul 19, 2017, at 5:45 AM, vanish via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
Debug: (2) pppoe: Executing select query: SELECT p.fiacc_dtl_id id, '0015w' username, 'Cleartext-Password' attribute, trim(p.fspassword) value, ':=' op FROM accounts a inner join acct_details p on a.fiaccount_id = p.fiaccount_id WHERE a.fscontrol = '0015w' ERROR: (2) pppoe: Invalid op "??s???" for attribute ??s???
The data returned from the database isn't what FreeRADIUS expects.
In informix cli i see next result for query:
"id" ; username ; attribute ; value ; op "2567890"; 0015w ; Cleartext-Password ; password ; :=
7. If replace "p.fiacct_dtl_id id" on "1 id" in query, then everything work fine.
Where can be the problem?
Informix is weird. The ID is used mainly for sorting entries in the default configuration. If you're not using the default configuration, then just making the ID always "1" is fine. Alan DeKok.
participants (2)
-
Alan DeKok -
vanish