(RADIATOR) preauthhook

Hugh Irvine hugh at open.com.au
Mon Aug 27 18:51:58 CDT 2001


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 at domain1 <mailto:pepe at domain1> , 1.1.1.1
> pepe at domain2 <mailto:pepe at 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 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