Hello Carlos -

On Tuesday 28 August 2001 00:33, Sola, Carlos Alberto wrote:

> > How can i write a preauthhook to normalize the username to store in 
session
> database?
>
> I have more than 10 realms (or domains) for the same user and i want to
> limit maxsessions to 1, but i have in session database (for example) :
>
> username, nasidentifier
> pepe@domain1 <mailto:pepe@domain1> , 1.1.1.1
> pepe@domain2 <mailto:pepe@domain2> , 1.1.1.2
>

You don't need a hook - you just need a RewriteUsername:

        # Strip the realm from all requests, because our
        # database only has user names (no realm)
        RewriteUsername      s/^([^@]+).*/$1

You can also add a column for the rewritten usernames in the session database 
and supply your own queries to do whatever you need to do.

hth

Hugh


-- 
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 [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to