(RADIATOR) Maximun sessions

Paul O'Shea paul at level9.net
Tue Jul 23 22:20:47 CDT 2002

by only once I'm presuming you mean for the account not to be used more than once simultaneously... there is probably a better way, but maybe you could add an extra field "state" or something similar and use a postauthhook to set state to 1 once they login, then have a prehook to check state when users login, to ensure its set to zero... but then you might end with probs when you don't get 'stop' records to clear the state... anyway I'm sure Hugh has a much cleverer solution :-)

  ----- Original Message ----- 
  From: Shaun 
  To: radiator at open.com.au 
  Sent: Wednesday, July 24, 2002 2:04 AM
  Subject: (RADIATOR) Maximun sessions


  I'm using radiator for prepaid and post internet service. I have it set up so that for prepaid  it grabs users from an informix database and substracts time and so forth. The problem that i'm having is that i only  want users from this particular database to be able to log in only once. Post-paid users on the other hand authenticate from a flat users file an will have the privelege to be able to do multiple loggin sessions.I would like to know how to specify different "Maximum Sessions" for each. Here is an example of my config file

  # more radius.cfg
  Trace 4
  PidFile /tmp/radiusd.pid

  LogDir          .
  DbDir           .

  LogFile         %L/logfile
  DictionaryFile %D/dictionary

          Secret  ***********

          Secret  *********

  #DupInterval 0

  <Realm DEFAULT>
     MaxSessions     1
              AcctLogFileName %L/detail

          WtmpFileName %L/wtmp

          PasswordLogFileName %L/password.log

          AuthByPolicy    ContinueUntilAccept

          <AuthBy SQL>
                  Identifier SQL
                  DBSource        dbi:Informix:tis
                  DBUsername      informix
                  DBAuth          l1gaw01

                  AuthSelect select password, balancetime from subscribers where (
  username='%n' and balancetime > 0)

                  AuthColumnDef   0,Password,check
                  AuthColumnDef   1,Session-Timeout,reply
                  AddToReply      Service-Type = Framed-User,Framed-Protocol = PPP

          AcctSQLStatement update subscribers set balancetime=balancetime-0%{Acct-
  Session-Time} where username='%n'

          <AuthBy FILE>
                  Identifier File
                  Filename        ./users


  And here is an example of our users file:

  prepaid Password = "prepaid"
          Simultaneous-Use = 2,
          Service-Type = Framed-User,
          Framed-Protocol = PPP,
          Framed-IP-Netmask =,
          Framed-Routing = None,
          Framed-MTU = 1500,
          Framed-Compression = Van-Jacobson-TCP-IP,
          Session-Timeout = 300,
          Primary-DNS-Server =,
          Secondary-DNS-Server =,
          Client-Assign-DNS = Yes,
          cisco-avpair = "ip:dns-servers="

  Could  you tell me what i'm doing wrong?

  Shaun Eck
  Belize Telecom Ltd
  Belize City, Belize

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20020724/0165f5d7/attachment.html>

More information about the radiator mailing list