[RADIATOR] Expiration date

Hugh Irvine hugh at open.com.au
Thu Dec 17 15:52:16 CST 2009


Hello Aziz -

I am still waiting for you to tell me the name of the registered company that has purchased this copy of Radiator?

Until you provide me with the company details I will be unable to answer any further questions.

Expiration is a check item, not a reply item - see section 13.1.4 in the Radiator 4.5.1 reference manual ("doc/ref.pdf").

Your configuration should look like this (you also have a typo on the "AuthColumnDef 7 ....." line):


<AuthBy SQL>
NoDefault
Identifier      **********
DBSource        ********************
DBUsername      ********
DBAuth          *********
AuthSelect      SELECT DISTINCT u.password, CASE u.balancetime \
WHEN NULL THEN \
( CASE u.expirydate  WHEN NULL THEN  (CASE acc.balancetime  WHEN NULL
THEN to_char((sysdate+acc.DAYS),'YYYY-MM-DD HH24:MI:ss') ELSE
to_char((SYSDATE + (acc.balancetime/24)),'YYYY-MM-DD HH24:NI')  END  ) \
ELSE to_char(u.expirydate,'YYYY-MM-DD HH24:MI:ss')  END ) ELSE
TO_char((SYSDATE + (u.balancetime/86400)),'YYYY-MM-DD HH24:MI:ss') END
as \
BALANCETIME, u.FRAMEDIPADDRESS, acc.REPLYATTR, s.REPLYATTR,\
U.VRF,u.SPEED,per.CHECKATTR as PRE_CHECKATTR \
FROM USERS u, NASGROUP ng, ACCOUNTTYPESGROUP ag, Accounttypes acc,
PERMISSIONS per, VRFS v,SPEEDS s \
WHERE ng.groupname=ag.groupname \
AND u.accounttype = ag.accounttype \
AND u.accounttype = acc.accounttype \
AND u.accounttype= ag.accounttype \
AND u.SPEED=s.speed(+) \
AND u.vrf=v.vrf(+) \
AND u.PERMISSIONID=per.ID(+) \
AND u.status=1 \
AND (u.BALANCETIME > 0 or u.BALANCETIME IS NULL) \
AND (u.STARTDATE <= SYSDATE or u.STARTDATE IS NULL) \
AND ng.NASIDENTIFIER='%N' \
AND u.username='%n'

# check items
AuthColumnDef   0,User-Password,check
AuthColumnDef   1,Expiration,check

# reply items
AuthColumnDef   2,Framed-IP-Address,reply
AuthColumnDef   3,GENERIC,reply
AuthColumnDef   4,GENERIC,reply
AuthColumnDef   5,Connect-InfO,check
AuthColumnDef   6,GENERIC,reply
AuthColumnDef   7,GENERIC,reply

AddToReply      Session-Timeout="until Expiration", \
                             Service-Type=Framed-User, \
                             Framed-Protocol = PPP, \
                             Framed-IP-Netmask = 255.255.255.255

AccountingStopsOnly
AccountingTable ACCOUNTING
AcctColumnDef   ACCTSESSIONID,Acct-Session-Id
AcctColumnDef   USERNAME,User-Name
AcctColumnDef   TIMESTAMP,Timestamp,formatted-date,'to_date('%e %m %Y
%H:%M:%S','DD MM YYYY HH24:MI:SS')'
AcctColumnDef   CALLERID,Calling-Station-Id
AcctColumnDef   CALLEDID,Called-Station-Id
AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address
AcctColumnDef   ACCTSESSIONTIME,Acct-Session-Time,integer
AcctColumnDef   NASIDENTIFIER,NAS-IP-Address
AcctColumnDef   NASPORT,NAS-Port,integer
</AuthBy


regards

Hugh


On 18 Dec 2009, at 00:29, aziz at el-shihabi.com wrote:

> 
> 
> 
> <AuthBy SQL>
> NoDefault
> Identifier      **********
> DBSource        ********************
> DBUsername      ********
> DBAuth          *********
> AuthSelect      SELECT DISTINCT u.password, CASE u.balancetime \
> WHEN NULL THEN \
> ( CASE u.expirydate  WHEN NULL THEN  (CASE acc.balancetime  WHEN NULL
> THEN to_char((sysdate+acc.DAYS),'YYYY-MM-DD HH24:MI:ss') ELSE
> to_char((SYSDATE + (acc.balancetime/24)),'YYYY-MM-DD HH24:NI')  END  ) \
> ELSE to_char(u.expirydate,'YYYY-MM-DD HH24:MI:ss')  END ) ELSE
> TO_char((SYSDATE + (u.balancetime/86400)),'YYYY-MM-DD HH24:MI:ss') END
> as \
> BALANCETIME, u.FRAMEDIPADDRESS, acc.REPLYATTR, s.REPLYATTR,\
> U.VRF,u.SPEED,per.CHECKATTR as PRE_CHECKATTR \
> FROM USERS u, NASGROUP ng, ACCOUNTTYPESGROUP ag, Accounttypes acc,
> PERMISSIONS per, VRFS v,SPEEDS s \
> WHERE ng.groupname=ag.groupname \
> AND u.accounttype = ag.accounttype \
> AND u.accounttype = acc.accounttype \
> AND u.accounttype= ag.accounttype \
> AND u.SPEED=s.speed(+) \
> AND u.vrf=v.vrf(+) \
> AND u.PERMISSIONID=per.ID(+) \
> AND u.status=1 \
> AND (u.BALANCETIME > 0 or u.BALANCETIME IS NULL) \
> AND (u.STARTDATE <= SYSDATE or u.STARTDATE IS NULL) \
> AND ng.NASIDENTIFIER='%N' \
> AND u.username='%n'
> AuthColumnDef   0,User-Password,check
> AuthColumnDef   1,Expiration,reply
> AuthColumnDef   2,Framed-IP-Address,reply
> AuthColumnDef   3,GENERIC,reply
> AuthColumnDef   4,GENERIC,reply
> AuthColumnDef   5,Connect-InfO,check
> AuthColumnDef   6,GENERIC,reply
> AuthColumnDef   7,GENERIC,replay
> AddToReply      Session-Timeout="until Expiration",Service-Type
> ration=Framed-User,Framed-Protocol = PPP,Framed-IP-Netmask =
> 255.255.255.255
> AccountingStopsOnly
> AccountingTable ACCOUNTING
> AcctColumnDef   ACCTSESSIONID,Acct-Session-Id
> AcctColumnDef   USERNAME,User-Name
> AcctColumnDef   TIMESTAMP,Timestamp,formatted-date,'to_date('%e %m %Y
> %H:%M:%S','DD MM YYYY HH24:MI:SS')'
> AcctColumnDef   CALLERID,Calling-Station-Id
> AcctColumnDef   CALLEDID,Called-Station-Id
> AcctColumnDef   FRAMEDIPADDRESS,Framed-IP-Address
> AcctColumnDef   ACCTSESSIONTIME,Acct-Session-Time,integer
> AcctColumnDef   NASIDENTIFIER,NAS-IP-Address
> AcctColumnDef   NASPORT,NAS-Port,integer
> </AuthBy
> 
> ERROR Message :
> Thu Dec 17 14:13:47 2009: ERR: There is no value named until 2009-12-17
> 14:15:31 for attribute Session-Timeout. Using 0.
> Thu Dec 17 14:13:47 2009: DEBUG: Packet dump:
> *** Sending to 196.1.69.102 port 34508 ....
> Code:       Access-Accept
> Identifier: 79
> Authentic:  w<210><25><238>kJ<192>eVY<184>49#r<5>
> Attributes:
>        Session-Timeout = until 2009-12-17 14:15:31
>        Service-Type = Framed-User
>        Framed-Protocol = PPP
>        Framed-IP-Netmask = 255.255.255.255
> 
> 
> 
> 
> AND when I tried to use 
> "AuthColumnDef   1,Session-Timeout,reply" it gives me this error 
> Thu Dec 17 14:07:51 2009: ERR: There is no value named 2009-12-17
> 14:10:31 for attribute Session-Timeout. Using 0.
> Thu Dec 17 14:07:51 2009: DEBUG: Packet dump:
> *** Sending to 196.1.69.102 port 34508 ....
> Code:       Access-Accept
> Identifier: 77
> Authentic:  <11><156>G<17>(<28><240><189><192><166>N<204><164>c{&
> Attributes:
>        Session-Timeout = 2009-12-17 14:10:31
>        Service-Type = Framed-User
>        Framed-Protocol = PPP
>        Framed-IP-Netmask = 255.255.255.255
> 
> AND when I tried to put it as number it works fine, and regarding to
> your doucmentation page "286" it should work.
> 
> Please Advice as soon as possible.
> 
> 
> Regards 
> 
> ----------------------------------------------------
> Abdulaziz Moh'd El-Shihabi
> Applications and Database Administrator
> 
> mob: +965 6112411
> fax : +965 2626497 
> www.el-shihabi.com 
> aziz at el-shihabi.com
> 
> _______________________________________________
> radiator mailing list
> radiator at open.com.au
> http://www.open.com.au/mailman/listinfo/radiator



NB: 

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive (www.open.com.au/archives/radiator)?
Have you had a quick look on Google (www.google.com)?
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.
Includes support for reliable RADIUS transport (RadSec),
and DIAMETER translation agent.
-
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.





More information about the radiator mailing list