(RADIATOR) accounting multiple cisco-avpair attributes
Hugh Irvine
hugh at open.com.au
Fri May 14 00:08:01 CDT 2004
Hello Isuru -
You will need to write a hook to parse the attribute into whatever
format you require.
The code shown below can be used to get started with.
regards
Hugh
On 14 May 2004, at 14:33, Isuru Binduhewa wrote:
> Hi All
> I am currently getting the accounting date to MySQL db.I have some
> problem with getting attributes like
> cisco-h323-setup-time = "h323-setup-time=*10:58:40.746 UTC Sat May 8
> 2004" to the DB
> What is store under SetUpTime in the ACCOUNTING table of mySQL DB is
> h323-setup-time=*10:58:40.746 UTC Sat May 8 2004.I just want to get
> the set up time as DATE Time format.
>
> Pls help me on this.
>
> Thanks
> Isuru..
>
>
> -----Original Message-----
> From: Chris Patterson [mailto:Chris.Patterson at transact.com.au]
> Sent: Friday, May 14, 2004 9:02 AM
> To: radiator at open.com.au
> Subject: (RADIATOR) accounting multiple cisco-avpair attributes
>
>
> Folks,
> I've seen some discussion on the lists related to the logging of
> cisco-avpairs, and thought I would contribute the following:
>
> All I'm doing here is taking each cisco-avpair attribute from the
> incoming packet and adding new attributes onto the same incoming
> packet.
>
> eg:
> cisco-avpair = "task_id=62"
> cisco-avpair = "timezone=UTC"
> cisco-avpair = "service=shell"
> cisco-avpair = "priv-lvl=0"
> cisco-avpair = "cmd=exit <cr>"
>
> become:
> task_id = 62
> timezone = UTC
> service = shell
> priv-lvl = 0
> cmd = "exit <cr>"
>
> Hope this assists people in their endeavours!
>
> Cheers
> Chris.
>
>
> radiator.cfg
>
> <Handler>
> PreProcessingHook file:"%D/createavpairs"
> <AuthBy SQL>
> DBSource dbi:mysql:radius
> DBUsername test
> DBAuth test
>
> AccountingTable ACCOUNTING
> AcctColumnDef TIMESTAMP,Timestamp,integer
> AcctColumnDef NASIP,NAS-IP-Address
> AcctColumnDef USERNAME,User-Name
> AcctColumnDef CALLLINGID,Calling-Station-Id
> AcctColumnDef PRIVLVL,priv-lvl
> AcctColumnDef CMD,cmd
> </AuthBy>
> </Handler>
>
>
> createavpairs
>
> sub {
> my $p=${$_[0]};
> if (my @avpair = $p->get_attr('cisco-avpair')) {
> foreach my $avpair (@avpair) {
> $p->add_attr(split('=',$avpair));
> }
> }
> }
>
> --
> Archive at http://www.open.com.au/archives/radiator/
> Announcements on radiator-announce at open.com.au
> To unsubscribe, email 'majordomo at open.com.au' with
> 'unsubscribe radiator' in the body of the message.
>
> <InterScan_Disclaimer.txt>
NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list