Hi Jason

On Mar 24,  6:31pm, Jason J. Horton wrote:
> Subject: (RADIATOR) RewriteUsername question
> I am not very familiar with the way the RewriteUsername stuff works.
> What I would like to do is take a username like this:
> re010045
> and turn it into this:
> 0045@re01
> Basically take the first 4 characters from the beginning, move them
> to the end, separating with an @ sign. This way I can hand out usernames
> so I don't have to explain the concept of realms to end users.
> Am I correct in assuming that if I do this, then I can use multiple
> <Realm> statements, authenticating from different user files/sql
> databases?
Yes, you can do this. RewriteUsername can be set up to apply to all requests,
only the requests from a certaion Client, or only the requests handled by a
certain Realm or Handler (see radius.cfg for examples)

In your case, you will want something like this at the top level, then you can
have multiple realm clauses to match the first 4 characters (which will become
the realm name).

RewriteUsername  s/(.{4})(.*)/$2\@$1/

(BTW, you could get the same effect with something like
<Handler User-Name=/^re01/>
        RewriteUsername s/^.{4}//
        <AuthBy ...>
<Handler User-Name=/^re02/>
        RewriteUsername s/^.{4}//
        <AuthBy ...>

Hope that helps.


>       -Jason J. Horton <[EMAIL PROTECTED]>
>        Senior Network & Systems Engineer
>        Intercom Online Inc.
>        212.378.2202 | http://www.intercom.com
> ===
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.
>-- End of excerpt from Jason J. Horton

Mike McCauley                               [EMAIL PROTECTED]
Open System Consultants Pty. Ltd            Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia   Consulting and development
Phone, Fax: +61 3 9598-0985                 http://www.open.com.au

Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald, 
Platypus, Freeside, external, etc etc on Unix, Win95/8, NT, Rhapsody
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to