Hello David -

On Wed, 12 Jan 2000, David Lloyd wrote:
> Maybe I'm a glutton for punishment. :-)
> 
> Several months ago, I set up session limits for my customers.  I am
> currently using a memory database becuase we can't "justify the cost" of
> using SQL (according to my boss).
> 
> The problem I hit was that one of my NASes uses a special
> User-Service-Type (I think that's the one) of Virtual, and I didn't want
> those logged in my session database.
> 
> So I posted to the list under the assumption that I would be allowed to
> use my SQL server for the project, but I have been expressly forbidden by
> someone who doesn't know much about it. :-)
> 
> The solution presented was to make a handler to send requests that use the
> 'Virtual' type to the memory DB, and all the stuff that I care about to
> the SQL DB.
> 
> Well, now that I've been degraded to a memory DB, this option won't work.
> So I had a great idea.
> 
> I made a module called SessNONE.pm that does nothing... that is, add,
> delete, and clearNas do nothing and exceeded always returns zero.
> 
> It seems to work okay, but I think the problem is in my config.  Check
> this out:
> 
> ------
> <SessionDatabase INTERNAL>
>         Identifier InMemory
> </SessionDatabase>
> 
> <SessionDatabase NONE>
>         Identifier Void
> </SessionDatabase>
> 
> <Handler NAS_Port_Type = Virtual>
>         SessionDatabase Void
> </Handler>
> 
> <Realm DEFAULT>
>         SessionDatabase InMemory
>         RewriteUsername s/^([^@]+).*/$1/
>         RewriteUsername s/^\s*$/unauthenticated/  
>         RewriteUsername tr/A-Za-z0-9_@//cd
>         AcctLogFileName %L/detail/detail.%Y%m%d
>         AcctLogFileFormat %{Timestamp} %{Acct-Session-Id} %{User-Name} 
>%{NAS-IP-Address} %{Acct-Status-Type} %{Service-Type} %{NAS-$
>         PasswordLogFileName %L/password.log.%Y%m%d
>         RejectHasReason
>         <AuthBy DBFILE>
>                 Filename        %D/users.dbm
>                 AddToReply      User-Name="%U"
>                 NoDefaultIfFound
>         </AuthBy>
> </Realm>

Yes. The problem is the SessionDatabase INTERNAL declaration that does not
recognise the Identifier keyword. There is a patch for this in the Radiator
2.14.1 patches area:

        http://www.open.com.au/radiator/downloads/patches-2.14.1/

10/1/00 INternal session databases were no recognising the 'Identifier'
parameter. Download a new version of SessINTERNAL.pm
from here.

If you don't want to download the patch, you can achieve the same result simply
by reversing the order of your SessionDatabase clauses above, as the last one
in the list is the one that will be used by default (assuming that your
SessNONE.pm recognises the Identifier keyword - actually just passes the
keyword to the super-class, SessGeneric.pm).

There is another approach to take here, especially if you want to use the
radwho and radacct cgi modules. You could use a SessionDatabase DBM as your
main SessionDatabase and use the INTERNAL as the place to put the unwanted
accounting packets.

hth

Hugh

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody

===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to