accounting
Alan Buxey
alan.buxey at gmail.com
Tue Jul 3 12:16:25 CEST 2018
hi,
your debug output only shows an authentication packet being dealt
with....so , what happens when an accounting packet is received? show that
being debugged. do you not get any accounting packets? if thats the case,
check the NAS config - and if thats fine, check your UDP 1813 path to the
server (firewall on and correctly configured?)
alan
On 3 July 2018 at 00:28, John Martins <jm829580 at gmail.com> wrote:
> Hello Based on the last mail I send the info requested in
> https://wiki.freeradius.org/guide/Users-Mailing-List.
>
>
> - What you are trying to do: I'm trying to setup radius in order that it
> inserts data in radacct.
> - why you are trying to do it: because it does not insert data despite
> it authenticates the users properly.
> - what you expect the server to do: to insert data in radacct table.
> - what the server does instead (i.e. debug output).
>
> Debug Output:
>
> Ready to process requests
> (0) Received Access-Request Id 184 from 127.0.0.1:43810 to 127.0.0.1:1812
> length 74
> (0) User-Name = "test"
> (0) User-Password = "test"
> (0) NAS-IP-Address = 55.125.226.126
> (0) NAS-Port = 0
> (0) Message-Authenticator = 0x33c611c890fed552ae68589a573404eb
> (0) # Executing section authorize from file
> /etc/freeradius/3.0/sites-enabled/default
> (0) authorize {
> (0) [preprocess] = ok
> (0) [chap] = noop
> (0) [mschap] = noop
> (0) suffix: Checking for suffix after "@"
> (0) suffix: No '@' in User-Name = "test", looking up realm NULL
> (0) suffix: No such realm "NULL"
> (0) [suffix] = noop
> (0) eap: No EAP-Message, not doing EAP
> (0) [eap] = noop
> (0) [files] = noop
> (0) sql: EXPAND %{User-Name}
> (0) sql: --> test
> (0) sql: SQL-User-Name set to 'test'
> rlm_sql (sql): Reserved connection (1)
> (0) sql: EXPAND SELECT id, username, attribute, value, op FROM radcheck
> WHERE username =
> '%
> {SQL-User-Name}' ORDER BY id
> (0) sql: --> SELECT id, username, attribute, value, op FROM radcheck
> WHERE username =
> 't
> est' ORDER BY id
> (0) sql: Executing select query: SELECT id, username, attribute, value, op
> FROM radcheck
> WH
> ERE username = 'test' ORDER BY id
> (0) sql: User found in radcheck table
> (0) sql: Conditional check items matched, merging assignment check items
> (0) sql: Cleartext-Password := "test"
> (0) sql: EXPAND SELECT id, username, attribute, value, op FROM radreply
> WHERE username =
> '%
> {SQL-User-Name}' ORDER BY id
> (0) sql: --> SELECT id, username, attribute, value, op FROM radreply
> WHERE username =
> 't
> est' ORDER BY id
> (0) sql: Executing select query: SELECT id, username, attribute, value, op
> FROM radreply
> WH
> ERE username = 'test' ORDER BY id
> (0) sql: EXPAND SELECT groupname FROM radusergroup WHERE username =
> '%{SQL-User-Name}'
> ORDE
> R BY priority
> (0) sql: --> SELECT groupname FROM radusergroup WHERE username = 'test'
> ORDER BY
> priorit
> y
> (0) sql: Executing select query: SELECT groupname FROM radusergroup WHERE
> username =
> 'test'
> ORDER BY priority
> (0) sql: User not found in any groups
> rlm_sql (sql): Released connection (1)
> Need 4 more connections to reach 10 spares
> rlm_sql (sql): Opening additional connection (6), 1 of 26 pending slots
> used
> rlm_sql_mysql: Starting connect to MySQL server
> rlm_sql_mysql: Connected to database 'radius' on Localhost via UNIX socket,
> server
> version
> 5.7.22-0ubuntu0.17.10.1-log, protocol version 10
> (0) [sql] = ok
> (0) [expiration] = noop
> (0) [logintime] = noop
> (0) [pap] = updated
> (0) } # authorize = updated
> (0) Found Auth-Type = PAP
> (0) # Executing group from file /etc/freeradius/3.0/sites-enabled/default
> (0) Auth-Type PAP {
> (0) pap: Login attempt with password
> (0) pap: Comparing with "known good" Cleartext-Password
> (0) pap: User authenticated successfully
> (0) [pap] = ok
> (0) } # Auth-Type PAP = ok
> (0) # Executing section post-auth from file
> /etc/freeradius/3.0/sites-enabled/default
> (0) post-auth {
> (0) update {
> (0) No attributes updated
> (0) } # update = noop
> (0) sql: EXPAND .query
> (0) sql: --> .query
> (0) sql: Using query template 'query'
> rlm_sql (sql): Reserved connection (2)
> (0) sql: EXPAND %{User-Name}
> (0) sql: --> test
> (0) sql: SQL-User-Name set to 'test'
> (0) sql: EXPAND INSERT INTO radpostauth (username, pass, reply, authdate)
> VALUES (
> '%{SQL-U
> ser-Name}', '%{%{User-Password}:-%{Chap-Password}}',
> '%{reply:Packet-Type}', '%S')
> (0) sql: --> INSERT INTO radpostauth (username, pass, reply, authdate)
> VALUES (
> 'test',
> 'test', 'Access-Accept', '2018-07-03 01:15:11')
> (0) sql: EXPAND /var/log/freeradius/sqllog.sql
> (0) sql: --> /var/log/freeradius/sqllog.sql
> (0) sql: Executing query: INSERT INTO radpostauth (username, pass, reply,
> authdate)
> VALUES
> ( 'test', 'test', 'Access-Accept', '2018-07-03 01:15:11')
> (0) sql: SQL query returned: success
> (0) sql: 1 record(s) updated
> rlm_sql (sql): Released connection (2)
> (0) [sql] = ok
> (0) [exec] = noop
> (0) policy remove_reply_message_if_eap {
> (0) if (&reply:EAP-Message && &reply:Reply-Message) {
> (0) if (&reply:EAP-Message && &reply:Reply-Message) -> FALSE
> (0) else {
> (0) [noop] = noop
> (0) } # else = noop
> (0) } # policy remove_reply_message_if_eap = noop
> (0) } # post-auth = ok
> (0) Login OK: [test/test] (from client localhost port 0)
> (0) Sent Access-Accept Id 184 from 127.0.0.1:1812 to 127.0.0.1:43810
> length
> 0
> (0) Finished request
> Waking up in 4.9 seconds.
> (0) Cleaning up request packet ID 184 with timestamp +8
> Ready to process requests
>
>
>
>
>
> On Tue, Jul 3, 2018 at 1:03 AM, Alan DeKok <aland at deployingradius.com>
> wrote:
>
> > On Jul 2, 2018, at 3:41 PM, John Martins <jm829580 at gmail.com> wrote:
> > >
> > > My freeradius 3.0.16 is not inserting data into radact, and it
> complains
> > on
> > > start with the following error, but the accounting section is in
> > > radiusd.conf as stated below.
> >
> > It's not supposed to be there.
> >
> > > Can anybody give me a clue where can be the
> > > problem?
> >
> > You edited the default configuration, and broke it. Don't do that.
> >
> > Instead, follow the documentation. That says to start with the default
> > configuration, and then to make small changes.
> >
> > In the default configuration, the "accounting" section is in
> > sites-enabled/default. Edit it there.
> >
> > The comments at the bottom of "radiusd.conf" make this clear.
> >
> > If you're going to edit the configuration files, then you should *read*
> > them.
> >
> > > accounting {
> > > # We leave "detail" enabled to _additionally_ log accounting to
> > > /var/lo$
> > > detail
> > > sql
> > > }
> > >
> > >
> > > Error on freeradius Start:
> > >
> > > /etc/freeradius/3.0/radiusd.conf[784]: The accounting section should
> be
> > > inside of a 'server { ... }' block!
> >
> > That seems pretty clear.
> >
> > Alan DeKok.
> >
> >
> > -
> > List info/subscribe/unsubscribe? See http://www.freeradius.org/
> > list/users.html
> >
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/
> list/users.html
>
More information about the Freeradius-Users
mailing list