(RADIATOR) RewriteUsername question

Matthew Trout MatthewTrout at businessserve.co.uk
Tue May 20 04:24:17 CDT 2003


RewriteUsername s/^ABC.// will strip 'ABC' followed by *any character* - if
you specifically want to remove a '.', use

RewriteUsername s/^ABC\.//

for a slash, use

RewriteUsername s/^ABC\///

If you want to be able to remove ABC followeed by either, use

RewriteUsername s/^ABC[\.\\]//

For more detailed info on rewriting (and some entertaining mental
contortions :) I'd suggest reading the 'perlre' manpage - web link for perl
5.8.0 is http://search.cpan.org/author/JHI/perl-5.8.0/pod/perlre.pod

-----Original Message-----
From: Hugh Irvine [mailto:hugh at open.com.au] 
Sent: 20 May 2003 00:20
To: James Nelson
Cc: radiator at open.com.au
Subject: Re: (RADIATOR) RewriteUsername question





Hello James - 


You can use multiple RewriteUsername's, so you can strip off the prefixes
like this: 


        # remove prefix "ABC." 
        RewriteUsername s/^ABC.// 


        # remove prefix "DEF." 
        RewriteUsername s/DEF.// 


        ..... 


regards 


Hugh 




On Tuesday, May 20, 2003, at 08:06 Australia/Melbourne, James Nelson wrote: 


Is it possible to create a string of things to remove from usernames that
are sent to my Radiator server for authentication?  We have a couple NASs
that are not in our control that use prepended strings to determine which
server to send the requests to, and occasionallly do not strip this off
before sending it to us.  Basically, I have a list of 3 different strings
(3-4 alphabetic chars plus a "." or "/" character) that might prepend a
username.  This list of possibilities might change somewhat frequently, so
if possible I'd like to be able to set some kind of global strings of what
to filter. 
 
Major problems I have is that the "." char is valid on our systems, so I
can't just strip everything before a period, it will have to match our 3-4
letter string and a "." or 3-4 letter and a "/".  This will always be at the
beginning of the usrename, if that makes it easier.  Also note that I am
already using RewriteUsername to strip the realm before authenticating. 
 
Thanks for the help, 
::James Nelson 



NB: have you included a copy of your configuration file (no secrets), 
together with a trace 4 debug showing what is happening? 


-- 
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