> hi all,
> i have installed freeRADIUS-0.8.1 and don't have any problem with auth
when
> using users file, but when i wanna use postgresql, get this message from
> radius -X command:
> rad_recv: Access-Request packet from host 127.0.0.1:32773, id=38,
length=55
> User-Name = "fred"
> User-Password = "123"
> NAS-IP-Address = 255.255.255.255
> NAS-Port = 0
> modcall: entering group authorize
> modcall[authorize]: module "preprocess" returns ok
> rlm_chap: Could not find proper Chap-Password attribute in request
> modcall[authorize]: module "chap" returns noop
> modcall[authorize]: module "mschap" returns notfound
> rlm_realm: No '@' in User-Name = "fred", looking up realm NULL
> rlm_realm: No such realm NULL
> modcall[authorize]: module "suffix" returns noop
> radius_xlat: 'fred'
> rlm_sql (sql): sql_set_user escaped user --> 'fred'
> radius_xlat: 'SELECT id,UserName,Attribute,Value,Op FROM radcheck WHERE
> Username = 'fred' ORDER BY id'
> rlm_sql (sql): Reserving sql socket id: 4
> rlm_sql_postgresql: query: SELECT id,UserName,Attribute,Value,Op FROM
radcheck
> WHERE Username = 'fred' ORDER BY id
> rlm_sql_postgresql: PostgreSQL Query failed Error: no connection to the
server
> rlm_sql_getvpdata: database query error
> rlm_sql (sql): SQL query error; rejecting user
> rlm_sql (sql): Released sql socket id: 4
> modcall[authorize]: module "sql" returns fail
> modcall: group authorize returns fail
> Finished request 0
>
> i maked these changes for working with PostgreSQL:
> 1.edited /usr/local/etc/raddb/radiusd.conf and added a "sql" line before
> "files" in authorize section.
> 2.i did the same thing as in my first step in accounting section.
> 3.changed "$INCLUDE ${confdir}/sql.conf" to "$INCLUDE
> ${confdir}/postgresql.conf"
> 4.created a db and user in sql named radius and created tables using
script in
> source files; added an entry " fred password == 123 " in radcheck table
and
> also altered some other tables.
> 5.i even added " local all trust" line to pg_hba.conf file for ensuring
that i
> wouldn't have any security problem in postgresql.
>
> thank you in advance for your helps,
> bye,
> habib
Hi Habib,
Have you edited the postgresql.conf file and entered the correct connection
details (username/password/host/db) ?
I have also found that with freeradius-0.9.0-pre3 that Auth-Type should be
set to Local in your db although this does not seem to be your problem.
When you start radius with radiusd -X, do you see the db handles loaded ?
Barry
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html