Problem Accounting with PostGreSQL
Hi, We are using PostGreSQL for accounting. But when we made a query, we saw all tables are empty except "radpostauth" and we need informations about "radacct" table. So, when we were using FreeRADIUS 1.1.7, we changed "postgresql.conf"'s last comment like that: We changed this comment: postauth_query = "INSERT INTO ${postauth_table} (username, pass, reply, authdate) VALUES ('%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}', NOW())" like that: postauth_query = "INSERT into ${acct_table1} \ (AcctSessionId, AcctUniqueId, UserName, Realm, NASIPAddress, NASPortId, NASPortType, AcctStartTime, AcctAuthentic, \ ConnectInfo_start, CalledStationId, CallingStationId, ServiceType, FramedProtocol, FramedIPAddress, AcctStartDelay, XAscendSessionSvrKey) \ values('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}', '%{NAS-IP-Address}', \ '%{NAS-Port}', '%{NAS-Port-Type}', ('%S'::timestamp - '%{Acct-Delay-Time:-0}'::interval), '%{Acct-Authentic}', '%{Connect-Info}', \ '%{Called-Station-Id}', '%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}', \ NULLIF('%{Framed-IP-Address}', '')::inet, 0, '%{X-Ascend-Session-Svr-Key}')" And it worked:) But now, we are using FreeRADIUS 2.0.4 and when we have changed "postgresql.conf" like over, it doesn't work. When someone tries to connect with FreeRADIUS, it gives "Login Incorrect" message. Is there any link including a solution about my problem?
mehtap@comu.edu.tr wrote:
We are using PostGreSQL for accounting. But when we made a query, we saw all tables are empty except "radpostauth" and we need informations about "radacct" table.
This is in the FAQ. If the NAS doesn't send accounting packets, the server won't be able to log accounting information.
So, when we were using FreeRADIUS 1.1.7, we changed "postgresql.conf"'s last comment like that:
That is useless. It hides the problem. It doesn't *create* accounting data, because only the NAS can do that. Fix the NAS so that it sends accounting packets. Alan DeKok.
participants (2)
-
Alan DeKok -
mehtap@comu.edu.tr