(RADIATOR) Multiple session databases

Hugh Irvine hugh at open.com.au
Wed Dec 19 17:39:35 CST 2001


Hello David -

You cannot use more than one session database in any given Realm or Handler.

However you can accomplish the same thing by adding a couple of AuthBy SQL 
clauses like this:

#==================
# AuthBy SQL clauses
#  (empty AuthSelect)
#==================
<AuthBy SQL>
     Identifier AccountingStarts
     DBSource    dbi:DB2:radius2
     DBUsername  raduser
     DBAuth       xxxxxx
     AuthSelect
     AccountingStartsOnly
     AcctSQLStatement .......
     AcctSQLStatement .......
</AuthBy>

<AuthBy SQL>
     Identifier AccountingStops
     DBSource    dbi:DB2:radius2
     DBUsername  raduser
     DBAuth       xxxxxx
     AuthSelect
     AccountingStopsOnly
     AcctSQLStatement .......
     AcctSQLStatement .......
</AuthBy>

#==================
# Realms
#==================
<Realm DEFAULT>
     # Session Database to use
     SessionDatabase RadiusDB2

     # AuthByPolicy to control AuthBy clauses

     AuthByPolicy ContinueAlways

     # AuthBy SQL clauses to simulate session database

     AuthBy AccountingStarts
     AuthBy AccountingStops

     <AuthBy FILE>
         # Make passwords case insensitive
            CaseInsensitivePasswords

         # Default SimultaneousUse check item. Can be overridden on a per 
user basis.
         DefaultSimultaneousUse 1

         Filename %D/users
            # no caching for test purposes
            # Nocache
     </AuthBy>

     # Log accounting to a detail file
     # Detail filename in form of detail.dd_Mmm_yyy
     AcctLogFileName     %L/detail.%d_%v_%Y
</Realm>


hth

Hugh


On Thu, 20 Dec 2001 08:19, David Miller wrote:
> Hello all:
>          I am wondering if it is possible to have multiple session
> databases in use at the same time. We currently have our session database
> setup using IBM's DB2 and it works fine. I am wanting to setup a MySQL
> database and migrate over to it. During the migration it would be very
> handy to have radiator keep duplicate databases so we can test several
> programs that we use here to query the session database, without
> interfering with the 'production' versions.
>          Below is the configuration file we are currently using. Thanks in
> advance for any help or advice.
>
> Regards,
> David Miller
> dmiller at newportnet.com
>
>
>
> -------------------------------------------------------------------
> # radius.cfg
> # Created for use at Newport Internet
> #
>
> #=====================
> # Global Parameters
> #=====================
> LogDir  /var/log/radius
> DbDir   /etc/radiator/raddb
>
> AuthPort 1645
> AcctPort 1646
>
> # User a low trace level in production systems. Increase
> # it to 4 or 5 for debugging, or use the -trace flag to radiusd
> Trace 3
> # Trace 5
>
> # Log file, in form of logfile.dd_Mmm_yyy
> LogFile %L/logfile.%d_%v_%Y
>
> # Username Rewrite Rules. Strip off realm name, change to lowercase, and
> remove #  any whitespace.
> RewriteUsername s/^([^@]+).*/$1/
> RewriteUsername tr/A-Z/a-z/
> RewriteUsername s/\s+//g
>
> #===========
> # Clients
> #===========
> <Client a.b.c.d>
>      Secret xxxxxx
>      DupInterval 0
> </Client>
>
> <Client a.b.c.e>
>      Secret xxxxxx
>      DupInterval 0
> </Client>
>
> <Client a.b.c.f>
>      Secret xxxxxx
>      DupInterval 0
> </Client>
>
> <Client a.b.c.g>
>      Secret xxxxxx
>      DupInterval 0
> </Client>
>
> <Client a.b.c.h>
>      Secret xxxxxx
>      DupInterval 0
> </Client>
>
> #==================
> # Session Database
> #==================
> <SessionDatabase SQL>
>      Identifier RadiusDB2
>      DBSource    dbi:DB2:radius2
>      DBUsername  raduser
>      DBAuth       xxxxxx
> </SessionDatabase SQL>
>
> #==================
> # Realms
> #==================
> <Realm DEFAULT>
>      # Session Database to use
>      SessionDatabase RadiusDB2
>
>      <AuthBy FILE>
>          # Make passwords case insensitive
>             CaseInsensitivePasswords
>
>          # Default SimultaneousUse check item. Can be overridden on a per
> user basis.
>          DefaultSimultaneousUse 1
>
>          Filename %D/users
>             # no caching for test purposes
>             # Nocache
>      </AuthBy>
>
>      # Log accounting to a detail file
>      # Detail filename in form of detail.dd_Mmm_yyy
>      AcctLogFileName     %L/detail.%d_%v_%Y
> </Realm>
>
>
> ===
> 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.

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
===
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