Can I run two freeradius daemons on the same machine?

2005-04-22 Thread Brian Gao
Title: Can I run two freeradius daemons on the same machine?






Hi all,


Does anybody know that can I run two freeradius daemons on the same machine?


Thanks



Brian  





Can I have multiple "authcheck_table" in postgresql.conf

2005-04-21 Thread Brian Gao
Title: Can I have multiple "authcheck_table" in postgresql.conf 





Hi all,
I have a freeradius configured with postgresql , both are work well.


Because we have two groups of users in two different authentication tables in the DB, and I want freeradius will check both table when it get access-request.

My question is in the configure file ---postgresql.conf, can I add another "authcheck_table", which means can I have two (or multiple) "authcheck_table" in that file? Of course I have to create two tables(radcheck and radcheck_2) in DB first.

Do you think it is possible?if so  ,how?


Thanks


Brian


 





Freeradius with postgresql (Login incorrect)

2005-04-14 Thread Brian Gao
Title: Freeradius with postgresql (Login incorrect)





Hi, all


I am trying to configure postgresql 7.4 as a backend of freeradius server. 
After I run " radtest radius radius 47.135.23.217 1812 testing123 "The debug file shows:



rad_recv: Access-Request packet from host 47.135.123.217:32782, id=217, length=58
    User-Name = "radius"
    User-Password = "radius"
    NAS-IP-Address = 255.255.255.255
    NAS-Port = 1812
rlm_sql (sql): Reserving sql socket id: 4
rlm_sql_postgresql: query: SELECT id, UserName, Attribute, Value, Op ??FROM radcheck ??WHERE Usernam
e = 'radius' ??ORDER BY id
rlm_sql_postgresql: Status: PGRES_TUPLES_OK
rlm_sql_postgresql: affected rows =
rlm_sql_postgresql: query: SELECT radgroupcheck.id, radgroupcheck.GroupName, ??radgroupcheck.Attribu
te, radgroupcheck.Value,radgroupcheck.Op ??FROM radgroupcheck, usergroup ??WHERE usergroup.Username
= 'radius' AND usergroup.GroupName = radgroupcheck.GroupName ??ORDER BY radgroupcheck.id
rlm_sql_postgresql: Status: PGRES_TUPLES_OK
rlm_sql_postgresql: affected rows =
rlm_sql_postgresql: query: SELECT id, UserName, Attribute, Value, Op ??FROM radreply ??WHERE Usernam
e = 'radius' ??ORDER BY id
rlm_sql_postgresql: Status: PGRES_TUPLES_OK
rlm_sql_postgresql: affected rows =
rlm_sql_postgresql: query: SELECT radgroupreply.id, radgroupreply.GroupName, radgroupreply.Attribute
, ??radgroupreply.Value, radgroupreply.Op ??FROM radgroupreply,usergroup ??WHERE usergroup.Username
= 'radius' AND usergroup.GroupName = radgroupreply.GroupName ??ORDER BY radgroupreply.id
rlm_sql_postgresql: Status: PGRES_TUPLES_OK
rlm_sql_postgresql: affected rows =
rlm_sql (sql): Released sql socket id: 4
Login incorrect: [radius/radius] (from client 47.135.123.0 port 1812)
rad_recv: Access-Request packet from host 47.135.123.217:32782, id=217, length=58
Sending Access-Reject of id 217 to 47.135.123.217:32782


This looks to me like the connection is established already, the error that is being
thrown looks like it is coming from the PostgreSQL. 
I have searched on Internet but didn't find the exact error.  Any ideas?


TIA


Brian 





Problem with postgresql (permission denied for relation radcheck )

2005-04-13 Thread Brian Gao
Title: Problem with postgresql (permission denied for relation radcheck )





Hi all,
I have a freeradius server with poetgresql configured, and I have imported the example db_postgresql.sql to the DB, they seems OK.

But when I run "radtest testing testing localhost 18 testing" command(I have user testing with passwd 'testing' in the table radcheck) , I am not able to get "Auth_accepted" message.

From postgresql's log file I could see that freeradius forwarded the "Auth request" to the DB. And the messages show:
2005-04-13 16:55:18 [1187] ERROR: permission denied for relation radcheck
2005-04-13 16:55:18 [1328] LOG: connection received: host=47.135.123.217 port=32784
2005-04-13 16:55:18 [1328] LOG: connection authorized: user=radius database=radius
2005-04-13 16:55:18 [1328] ERROR: permission denied for relation radcheck
From freeradius's debug mode, I could see the info like:
rad_recv: Access-Request packet from host 47.135.123.217:32769, id=62, length=59
rad_recv: Access-Request packet from host 47.135.123.217:32769, id=62, length=59
User-Name = "testing"
User-Password = "testing"
NAS-IP-Address = 255.255.255.255
NAS-Port = 18
rlm_sql (sql): Reserving sql socket id: 0
rlm_sql_postgresql: query: SELECT id, UserName, Attribute, Value, Op ??FROM radcheck ??WHERE Usernam
e = 'testing' ??ORDER BY id
rlm_sql_postgresql: Status: PGRES_FATAL_ERROR
rlm_sql_postgresql: affected rows =
rlm_sql_postgresql: Postgresql check_error: PGRES_FATAL_ERROR, returning SQL_DOWN
rlm_sql (sql): Attempting to connect rlm_sql_postgresql #0
rlm_sql (sql): Connected new DB handle, #0
rlm_sql_postgresql: query: SELECT id, UserName, Attribute, Value, Op ??FROM radcheck ??WHERE Usernam
e = 'testing' ??ORDER BY id
rlm_sql_postgresql: Status: PGRES_FATAL_ERROR
rlm_sql_postgresql: affected rows =
rlm_sql_postgresql: Postgresql check_error: PGRES_FATAL_ERROR, returning SQL_DOWN
rlm_sql (sql): failed after re-connect
rlm_sql_getvpdata: database query error
rlm_sql (sql): SQL query error; rejecting user
rlm_sql (sql): Released sql socket id: 0
rad_recv: Access-Request packet from host 47.135.123.217:32769, id=62, length=59
Does anyone get this problem before? I think the problem is in the DB..
Any iedas?
Thanks 



Brian  





Integrating with freeradius and postgresql.

2005-04-01 Thread Brian Gao
Title: Integrating with freeradius and postgresql. 





Where I can get this IIRC?


Thanks


Brian  





Integrating with freeradius and postgresql.

2005-04-01 Thread Brian Gao
Title: Integrating with freeradius and postgresql.






Just wondering if anyone has done "integrating with freeradius and postgresql"?



Brian  





Auth problem (freeradius+mysql)

2005-04-01 Thread Brian Gao
Title: Auth problem (freeradius+mysql)






Hi,
I have freeradius and mysql installed on my debian box, both of them are working fine.
But when I run command:  radtest testing password localhost 17 radius 
I got the messages like:


Sending Access-Request of id 129 to 127.0.0.1:1812
    User-Name = "testing"
    User-Password = "password"
    NAS-IP-Address = pkany217
    NAS-Port = 17
Re-sending Access-Request of id 129 to 127.0.0.1:1812
    User-Name = "testing"
    User-Password = "\24485\302\347\241-\325\361\300\342\241\300>\336\366"
    NAS-IP-Address = pkany217
    NAS-Port = 17
rad_recv: Access-Reject packet from host 127.0.0.1:1812, id=129, length=20
rad_decode: Received Access-Reject packet from 127.0.0.1:1812 with invalid signature (err=2)!  (Shar
ed secret is incorrect.)
radclient: radclient.c:440: send_one_packet: Assertion `radclient->reply == ((void *)0)' failed.
/usr/bin/radtest: line 53: 27008 Done    ( echo "User-Name = \"$1\""; echo "User-Pas
sword = \"$2\""; echo "NAS-IP-Address = $nas"; echo "NAS-Port = $4"; if [ "$6" ]; then
    echo "Framed-Protocol = PPP";
fi )
 27009 Aborted | $radclient $DICTIONARY -x $3 auth $5


Does anybody know why and how to solve this issue?



Thanks



Brian