(RADIATOR) First Login handling

Hisham Al-Shiha hshiha at medu.net.sa
Tue Nov 7 05:44:06 CST 2006


Hello Hugh,

	Thank you for your reply and sorry for my late reply :).
	
	Ok your suggestion is nice if the date calculation is possible but I
need to handle that through Perl. It's unavoidable I guess.

	Anyway, I did my first hook scripting in Perl that handles the date.
It maybe inefficient but it did the job after all. I hope someone will find
it useful.

Best Regards,
   Hesham Alshehah


-----Original Message-----
From: owner-radiator at open.com.au [mailto:owner-radiator at open.com.au] On
Behalf Of Hugh Irvine
Sent: Thursday, November 02, 2006 2:13 AM
To: Hisham Al-Shiha
Cc: radiator at open.com.au
Subject: Re: (RADIATOR) First Login handling



Hello Hisham -

If your database supports stored procedures and/or triggers you could  
do this processing directly in the database.

Otherwise you can add an AcctSQLStatement to set the expiry date and  
change the flag if it is 0.

See section 5.29.16 in the Radiator 3.15 reference manual.

hope that helps

regards

Hugh


On 1 Nov 2006, at 20:34, Hisham Al-Shiha wrote:

>
> Dear all,
>
> 	I would like to express my regards to every one in this fantastic 
> group.
> 	
> 	We are planning to launch a prepaid ADSL card accounts. All accounts

> are by default inactive (flag 0 in the db). So when the user tries to 
> connect the first time I want to run a Perl script in a hook that
> changes
> the flag to active and calculates the expiration date (i.e. automatic
> activation)
>
> 	I searched the mailing list archive for a similar case but I didn't 
> find such one. I know that the hook is "PostAuthHook". But my
> problem is my
> weakness in Perl programming. I'm not sure how to make a such  
> script. If you
> think there is another way and simpler one please guide me to it.
>
> 	Radiator version: 3.11
> 	DB: MySQL
>
> Regards,
> 	
> Hisham A. Al-Shiha
> Tel +(9661) 4623623 Ext. 342
> Fax +(9661) 4625348
> P.O.Box 14466 Riyadh 11424 Saudi Arabia
> MeduNet
>
>
> --
> 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.



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.


--
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postauthhook.pl
Type: application/octet-stream
Size: 5945 bytes
Desc: not available
URL: <http://www.open.com.au/pipermail/radiator/attachments/20061107/21638018/attachment.obj>


More information about the radiator mailing list