(RADIATOR) Problem on HPUX 64bit

Daud Yusof daudy at bee-net.com
Thu Jul 19 00:16:37 CDT 2001


I'm seeing ORA error in the logfile but the access is accepted. What
happenned here ?

>Wed Jul 18 00:01:33 2001: DEBUG: Radius::AuthRADMIN looks for match with
ovuser at network
>Wed Jul 18 00:01:33 2001: DEBUG: do query is:
>Wed Jul 18 00:01:33 2001: ERR: do failed for '': ORA-24373: invalid length
specified for statement (DBD ERROR: OCIStmtPrepare)
>Wed Jul 18 00:01:33 2001: DEBUG: do query is: insert into RADMESSAGES
(TIME_STAMP, TYPE, MESSAGE) values (995385693, 4, 'Radius::AuthRADMIN
ACCEPT: ')


I'm also getting an error in updating the account table for some of the
Realms due to missing User-Name etc.

>Wed Jul 18 12:45:26 2001: ERR: do failed for 'insert into
RADUSAGE(USERNAME, TIME_STAMP, ACCTSTATUSTYPE, ACCTDELAYTIME, ACCTSESSIONID,
NASIDENTIFIER, NASPORT, DNIS) values (, 995431525, 1, 0, , , 34, )':
ORA-00936: missing expression (DBD ERROR: OCIStmtExecute)


--Attachment--

Radmin.cfg

# radmin.cfg
#


Foreground
AuthPort 1645
AcctPort 1646
LogDir		/opt/radiator/Radiator-2.18.1/log
LogFile		%L/%d%m%y-logfile
DbDir		/opt/radiator/Radiator-2.18.1/raddb


Trace 4


<Client x.x.x.x>
	Secret xxx
	DupInterval 0
	RewriteUsername s/'//g
</Client>
<Client x.x.x.x>
	Secret xxx
	DupInterval 0
	DefaultRealm vpn
</Client>

<Client DEFAULT>
        Secret xxx
	DupInterval 0
	DefaultRealm network
	RewriteUsername s/'//g
</Client>


<Handler Called-Station-Id=8835018,Realm=abc.com>
	<AuthBy RADMIN>

		DBSource	dbi:Oracle:xxx
		DBUsername	radius
		DBAuth		radius

                AuthSelect select PASS_WORD, STATICADDRESS,\
				  TIMELEFT, MAXLOGINS \
		from RADUSERS \
		where USERNAME='%n' and BADLOGINS < 10 \
                  and VALIDFROM < %t and VALIDTO > %t \
                  and SERVICENAME='RAS'
                AuthColumnDef   0,User-Password,check

		# You can add to or change these if you want, but you
		# will probably want to change the database schema first
		AccountingTable	RADUSAGE
		AcctColumnDef	USERNAME,User-Name
		AcctColumnDef	TIME_STAMP,Timestamp,integer
		AcctColumnDef	ACCTSTATUSTYPE,Acct-Status-Type,integer
		AcctColumnDef	ACCTDELAYTIME,Acct-Delay-Time,integer
		AcctColumnDef	ACCTINPUTOCTETS,Acct-Input-Octets,integer
		AcctColumnDef	ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
		AcctColumnDef	ACCTSESSIONID,Acct-Session-Id
		AcctColumnDef	ACCTSESSIONTIME,Acct-Session-Time,integer
		AcctColumnDef	ACCTTERMINATECAUSE,Acct-Terminate-Cause,integer
		AcctColumnDef	FRAMEDIPADDRESS,Framed-IP-Address
		AcctColumnDef	NASIDENTIFIER,NAS-Identifier
		AcctColumnDef	NASIDENTIFIER,NAS-IP-Address
		AcctColumnDef	NASPORT,NAS-Port,integer
		AcctColumnDef	DNIS,Called-Station-Id

		# This updates the time and octets left
		# for this user
		AcctSQLStatement update RADUSERS set
TIMELEFT=TIMELEFT-0%{Acct-Session-Time},
OCTETSINLEFT=OCTETSINLEFT-0%{Acct-Input-Octets},
OCTETSOUTLEFT=OCTETSOUTLEFT-0%{Acct-Output-Octets} where USERNAME='%n'


		AddToReply Framed-Protocol = PPP,\
        		Framed-IP-Netmask = 255.255.255.255,\
        		Framed-Routing = None,\
        		Framed-MTU = 1500,\
			Framed-Compression = Van-Jacobson-TCP-IP
	</AuthBy>
</Handler>

<Handler Called-Station-Id=8835018,Realm=xyz.com>
        <AuthBy RADMIN>
                # Change DBSource, DBUsername, DBAuth for your database
                # See the reference manual. You will also have to
                # change the one in <SessionDatabse SQL> below
                # so its the same
                DBSource        dbi:Oracle:xxx
                DBUsername      radius
                DBAuth          radius
                #
                # define the select statement of Auth

                AuthSelect select PASS_WORD, STATICADDRESS,\
				  TIMELEFT, MAXLOGINS \
		from RADUSERS \
		where USERNAME='%n' and BADLOGINS < 10 \
                  and VALIDFROM < %t and VALIDTO > %t \
                  and SERVICENAME='RAS'
                AuthColumnDef   0,User-Password,check

		#You can add to or change these if you want, but you
                # will probably want to change the database schema first
                AccountingTable RADUSAGE
                AcctColumnDef   USERNAME,User-Name
                AcctColumnDef   TIME_STAMP,Timestamp,integer
                AcctColumnDef   ACCTSTATUSTYPE,Acct-Status-Type,integer
                AcctColumnDef   ACCTDELAYTIME,Acct-Delay-Time,integer
                AcctColumnDef   ACCTINPUTOCTETS,Acct-Input-Octets,integer
                AcctColumnDef   ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
                AcctColumnDef   ACCTSESSIONID,Acct-Session-Id
                AcctColumnDef   ACCTSESSIONTIME,Acct-Session-Time,integer
                AcctColumnDef
ACCTTERMINATECAUSE,Acct-Terminate-Cause,integer
                AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address
                AcctColumnDef   NASIDENTIFIER,NAS-Identifier
                AcctColumnDef   NASIDENTIFIER,NAS-IP-Address
                AcctColumnDef   NASPORT,NAS-Port,integer
                AcctColumnDef   DNIS,Called-Station-Id
                # This updates the time and octets left
                # for this user

AcctSQLStatement update RADUSERS set TIMELEFT=TIMELEFT-0%{Acct-S
ession-Time}, OCTETSINLEFT=OCTETSINLEFT-0%{Acct-Input-Octets},
OCTETSOUTLEFT=OCT
ETSOUTLEFT-0%{Acct-Output-Octets} where USERNAME='%n'
                # These are the classic things to add to each users
                # reply to allow a PPP dialup session. It may be
                # different for your NAS. This will add some
                # reply items to everyone's reply
                AddToReply Framed-Protocol = PPP,\
                        Framed-IP-Netmask = 255.255.255.255,\
                        Framed-Routing = None,\
                        Framed-MTU = 1500,\
			Framed-Compression = Van-Jacobson-TCP-IP
        </AuthBy>
</Handler>

<Realm vpn>
	<AuthBy RADMIN>
		# Change DBSource, DBUsername, DBAuth for your database
		# See the reference manual. You will also have to
		# change the one in <SessionDatabse SQL> below
		# so its the same
		DBSource	dbi:Oracle:xxx
		DBUsername	radius
		DBAuth		radius
		#
		# define the select statement of Auth

                AuthSelect select PASS_WORD, STATICADDRESS,\
				  TIMELEFT, MAXLOGINS \
		from RADUSERS \
		where USERNAME='%n' and BADLOGINS < 10 \
                  and VALIDFROM < %t and VALIDTO > %t \
                  and SERVICENAME='VPN'
                AuthColumnDef   0,User-Password,check

		# You can add to or change these if you want, but you
		# will probably want to change the database schema first
		AccountingTable	RADUSAGE
		AcctColumnDef	USERNAME,User-Name
		AcctColumnDef	TIME_STAMP,Timestamp,integer
		AcctColumnDef	ACCTSTATUSTYPE,Acct-Status-Type,integer
		AcctColumnDef	ACCTDELAYTIME,Acct-Delay-Time,integer
		AcctColumnDef	ACCTINPUTOCTETS,Acct-Input-Octets,integer
		AcctColumnDef	ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
		AcctColumnDef	ACCTSESSIONID,Acct-Session-Id
		AcctColumnDef	ACCTSESSIONTIME,Acct-Session-Time,integer
		AcctColumnDef	ACCTTERMINATECAUSE,Acct-Terminate-Cause,integer
		AcctColumnDef	FRAMEDIPADDRESS,Framed-IP-Address
		AcctColumnDef	NASIDENTIFIER,NAS-Identifier
		AcctColumnDef	NASIDENTIFIER,NAS-IP-Address
		AcctColumnDef	NASPORT,NAS-Port,integer
		AcctColumnDef	DNIS,Called-Station-Id

		# This updates the time and octets left
		# for this user
		AcctSQLStatement update RADUSERS set
TIMELEFT=TIMELEFT-0%{Acct-Session-Time},
OCTETSINLEFT=OCTETSINLEFT-0%{Acct-Input-Octets},
OCTETSOUTLEFT=OCTETSOUTLEFT-0%{Acct-Output-Octets} where USERNAME='%n'

		# These are the classic things to add to each users
		# reply to allow a PPP dialup session. It may be
		# different for your NAS. This will add some
		# reply items to everyone's reply
		AddToReply Framed-Protocol = PPP,\
        		Framed-IP-Netmask = 255.255.255.255,\
        		Framed-Routing = None,\
        		Framed-MTU = 1500,\
			Framed-Compression = Van-Jacobson-TCP-IP
	</AuthBy>
</Realm>

<Realm network>
	<AuthBy RADMIN>
		# Change DBSource, DBUsername, DBAuth for your database
		# See the reference manual. You will also have to
		# change the one in <SessionDatabse SQL> below
		# so its the same
		DBSource	dbi:Oracle:xxx
		DBUsername	radius
		DBAuth		radius
		#
		# define the select statement of Auth

                AuthSelect select PASS_WORD, STATICADDRESS,\
				  TIMELEFT, MAXLOGINS \
		from RADUSERS \
		where USERNAME='%n' and BADLOGINS < 10 \
                  and VALIDFROM < %t and VALIDTO > %t \
                  and SERVICENAME='NETWORK'
                AuthColumnDef   0,User-Password,check

		#
		# You can add to or change these if you want, but you
		# will probably want to change the database schema first
		AccountingTable	RADUSAGE
		AcctColumnDef	USERNAME,User-Name
		AcctColumnDef	TIME_STAMP,Timestamp,integer
		AcctColumnDef	ACCTSTATUSTYPE,Acct-Status-Type,integer
		AcctColumnDef	ACCTDELAYTIME,Acct-Delay-Time,integer
		AcctColumnDef	ACCTINPUTOCTETS,Acct-Input-Octets,integer
		AcctColumnDef	ACCTOUTPUTOCTETS,Acct-Output-Octets,integer
		AcctColumnDef	ACCTSESSIONID,Acct-Session-Id
		AcctColumnDef	ACCTSESSIONTIME,Acct-Session-Time,integer
		AcctColumnDef	ACCTTERMINATECAUSE,Acct-Terminate-Cause,integer
		AcctColumnDef	FRAMEDIPADDRESS,Framed-IP-Address
		AcctColumnDef	NASIDENTIFIER,NAS-Identifier
		AcctColumnDef	NASIDENTIFIER,NAS-IP-Address
		AcctColumnDef	NASPORT,NAS-Port,integer
		AcctColumnDef	DNIS,Called-Station-Id
		# This updates the time and octets left
		# for this user
		AcctSQLStatement update RADUSERS set
TIMELEFT=TIMELEFT-0%{Acct-Session-Time},
OCTETSINLEFT=OCTETSINLEFT-0%{Acct-Input-Octets},
OCTETSOUTLEFT=OCTETSOUTLEFT-0%{Acct-Output-Octets} where USERNAME='%n'
		# These are the classic things to add to each users
		# reply to allow a PPP dialup session. It may be
		# different for your NAS. This will add some
		# reply items to everyone's reply
		AddToReply Framed-Protocol = PPP,\
        		Framed-IP-Netmask = 255.255.255.255,\
        		Framed-Routing = None,\
        		Framed-MTU = 1500,\
			Framed-Compression = Van-Jacobson-TCP-IP
	</AuthBy>
</Realm>

<SessionDatabase SQL>
	# This database spec usually should be exactly the same
	# as in <AuthBy RADMIN> above
	DBSource	dbi:Oracle:xxx
	DBUsername	radius
	DBAuth		radius
</SessionDatabase>




===
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