Hello,
        I am trying to configure Radiator to log accounting data to my
postgres database.

The Authorization works fine, rejects and accepts okay.

However no accounting data arrives in the named accounting table.
If in my <AuthBy SQL> section I override the default accounting column
names, I get an error in the trace where it tries to run an INSERT statement
with no VALUES, i.e.:

INSERT INTO radius_accounting () VALUES ()

gets a syntax error on ')'
<shrug>

Thanks in Advance.

        Jamz.


my radius.cfg looks like:

# Set this to the database directory. It should contain these files:
# dictionary      The dictionary for your NAS
DbDir /usr/local/etc/raddb

#AuthPort       1645
AuthPort        16450

#AcctPort       1646
AcctPort        16460

#Foreground
#LogStdout
# User a lower trace level in production systems:
Trace           4

SnmpgetProg /usr/local/bin/snmpget

# This clause defines a single client to listen to
<Client adl-5300-1.airnet.com.au>
        NasType Cisco
        Secret  xxxxxx
        DefaultRealm airnet.com.au
</Client>

<Client DEFAULT>
        Secret  mysecret
        DupInterval 0
        DefaultRealm airnet.com.au
</Client>

<Realm airnet.com.au>
        # Take realm off the end of the username before Auth.
        RewriteUsername s/^([^@]+).*/$1/
        <AuthBy SQL>
                # AuthSelect with empty string means dont do auth
                AuthSelect select PASSWORD, CHECKATTR, REPLYATTR FROM
subscriber WHERE username =%0
                DBSource        dbi:Pg:host=dbhost;dbname=bmf
                DBUsername      radius
                DBAuth          xxxxx

                AccountingTable radius_accounting
        </AuthBy>

</Realm>


The output is as follows:
[root@radius Radiator-2.18]# radpwtst -user cmma -password xxxxxx -auth_port
16450 -acct_port 16460 -delay_time 3 -output_octets 3000
sending Access-Request...
OK
sending Accounting-Request Start...
OK
sending Accounting-Request Stop...
OK



Mon Apr  9 17:45:27 2001: DEBUG: Packet dump:
*** Received from 127.0.0.1 port 1035 ....
Code:       Access-Request
Identifier: 27
Authentic:  1234567890123456
Attributes:
        User-Name = "cmma"
        Service-Type = Framed-User
        NAS-IP-Address = 203.63.154.1
        NAS-Port = 1234
        Called-Station-Id = "123456789"
        Calling-Station-Id = "987654321"
        NAS-Port-Type = Async
        User-Password =
"<154><234>+<152><159>l4<146><211>_<9><160><216>}x<153>"

Mon Apr  9 17:45:27 2001: DEBUG: Handling request with Handler
'Realm=airnet.com.au'
Mon Apr  9 17:45:27 2001: DEBUG: Rewrote user name to cmma
Mon Apr  9 17:45:27 2001: DEBUG:  Deleting session for cmma, 203.63.154.1,
1234
Mon Apr  9 17:45:27 2001: DEBUG: Handling with Radius::AuthSQL
Mon Apr  9 17:45:27 2001: DEBUG: Handling with Radius::AuthSQL
Mon Apr  9 17:45:27 2001: DEBUG: Query is: select PASSWORD, CHECKATTR,
REPLYATTR FROM subscriber WHERE username ='cmma'

Mon Apr  9 17:45:27 2001: DEBUG: Radius::AuthSQL looks for match with cmma
Mon Apr  9 17:45:27 2001: DEBUG: Radius::AuthSQL ACCEPT:
Mon Apr  9 17:45:27 2001: DEBUG: Access accepted for cmma
Mon Apr  9 17:45:27 2001: DEBUG: Packet dump:
*** Sending to 127.0.0.1 port 1035 ....
Code:       Access-Accept
Identifier: 27
Authentic:  1234567890123456
Attributes:
        Service-Type = Framed-User
        Framed-Compression = Van-Jacobson-TCP-IP

Mon Apr  9 17:45:27 2001: DEBUG: Packet dump:
*** Received from 127.0.0.1 port 1035 ....
Code:       Accounting-Request
Identifier: 28
Authentic:  ^<217><168><22><215><254><170>O<146>%<247>l<137><153>q<3>
Attributes:
        User-Name = "cmma"
        Service-Type = Framed-User
        NAS-IP-Address = 203.63.154.1
        NAS-Port = 1234
        NAS-Port-Type = Async
        Acct-Session-Id = "00001234"
        Acct-Status-Type = Start
        Called-Station-Id = "123456789"
        Calling-Station-Id = "987654321"

Mon Apr  9 17:45:27 2001: DEBUG: Handling request with Handler
'Realm=airnet.com.au'
Mon Apr  9 17:45:27 2001: DEBUG: Rewrote user name to cmma
Mon Apr  9 17:45:27 2001: DEBUG:  Adding session for cmma, 203.63.154.1,
1234
Mon Apr  9 17:45:27 2001: DEBUG: Handling with Radius::AuthSQL
Mon Apr  9 17:45:27 2001: DEBUG: Handling accounting with Radius::AuthSQL
Mon Apr  9 17:45:27 2001: DEBUG: Accounting accepted
Mon Apr  9 17:45:27 2001: DEBUG: Packet dump:
*** Sending to 127.0.0.1 port 1035 ....
Code:       Accounting-Response
Identifier: 28
Authentic:  ^<217><168><22><215><254><170>O<146>%<247>l<137><153>q<3>
Attributes:

Mon Apr  9 17:45:27 2001: DEBUG: Packet dump:
*** Received from 127.0.0.1 port 1035 ....
Code:       Accounting-Request
Identifier: 29
Authentic:  <138>?<140><229><153><222><217><234>OC<18><192><230>y<10><147>
Attributes:
        User-Name = "cmma"
        Service-Type = Framed-User
        NAS-IP-Address = 203.63.154.1
        NAS-Port = 1234
        NAS-Port-Type = Async
        Acct-Session-Id = "00001234"
        Acct-Status-Type = Stop
        Called-Station-Id = "123456789"
        Calling-Station-Id = "987654321"
        Acct-Delay-Time = 3
        Acct-Session-Time = 1000
        Acct-Input-Octets = 20000
        Acct-Output-Octets = 3000

Mon Apr  9 17:45:27 2001: DEBUG: Handling request with Handler
'Realm=airnet.com.au'
Mon Apr  9 17:45:27 2001: DEBUG: Rewrote user name to cmma
Mon Apr  9 17:45:27 2001: DEBUG:  Deleting session for cmma, 203.63.154.1,
1234
Mon Apr  9 17:45:27 2001: DEBUG: Handling with Radius::AuthSQL
Mon Apr  9 17:45:27 2001: DEBUG: Handling accounting with Radius::AuthSQL
Mon Apr  9 17:45:27 2001: DEBUG: Accounting accepted
Mon Apr  9 17:45:27 2001: DEBUG: Packet dump:
*** Sending to 127.0.0.1 port 1035 ....
Code:       Accounting-Response
Identifier: 29
Authentic:  <138>?<140><229><153><222><217><234>OC<18><192><230>y<10><147>
Attributes:

===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to