[RADIATOR] mixed up User-Name values

Hugh Irvine hugh at open.com.au
Wed Jul 16 19:12:58 CDT 2008


Hi Dave -

Thanks for the report - I'm working on it - more to follow.

regards

Hugh



On 16 Jul 2008, at 00:15, Dave Kitabjian wrote:

> Hello folks,
>
> I could use a little help here. My CountQuery is not using the  
> rewritten username (%U), but rather the original (%u), although it  
> seems to respect other specials such as %h:
>
> <SessionDatabase SQL>
>
>>
>
>         # Use the Rewritten username, %U, rather than the %u default:
>
>         CountQuery select NASIDENTIFIER, NASPORT, ACCTSESSIONID,  
> FRAMEDIPADDRESS, USERNAME \
>
>                    from RADONLINE \
>
>                    where USERNAME='%h'    #works!!
>
>                    #where USERNAME='%U'    #DOESN'T work!
>
> </SessionDatabase>
>
> I have tried the setup with and without the  
> SessionDatabaseUseRewrittenName flag:
>
> <Handler>
>
>         PreProcessingHook       file:"%D/pphook.cfgx"
>
>         <AuthBy FILE>
>
>                 NoCheckPassword
>
>                 Filename %D/MY.users-inbound
>
>                 AuthenticateAttribute User-Name
>
>         </AuthBy>
>
>         PostAuthHook file:"%D/pahook.cfgx"
>
> #       SessionDatabaseUseRewrittenName     #ie, the AccountId
>
>         SessionDatabase SDBSQL1
>
> </Handler>
>
>
> In pphook, I replace the User-Name (an IP address) value with a  
> value from a SQL db, “1”:
>
>         $p->change_attr('User-Name', $accountID ) if defined  
> $accountID;
>
>
> The Auth, then, correctly uses the rewritten value:
>
>
>         Tue Jul 15 09:45:28 2008: DEBUG: Radius::AuthFILE looks for  
> match with 1 [192.168.1.100]
>
>
> But the Session checker insists on using the original value:
>
>
> Tue Jul 15 10:01:06 2008: DEBUG: Query is: 'select NASIDENTIFIER,  
> NASPORT, ACCTSESSIONID, FRAMEDIPADDRESS, USERNAME from RADONLINE  
> where USERNAME='192.168.1.100'':
>
>
> I also tried replacing the change_attr() call with:
>
>    $p->delete_attr('User-Name') if defined $accountID;
>
>    $p->add_attr('User-Name', $accountID ) if defined $accountID;
>
> but that didn’t help. I had no luck with a search through the code.
>
> Thanks in advance for the help!
>
> Dave
>
> _______________________________________________
> radiator mailing list
> radiator at open.com.au
> http://www.open.com.au/mailman/listinfo/radiator



NB:

Have you read the reference manual ("doc/ref.html")?
Have you searched the mailing list archive (www.open.com.au/archives/ 
radiator)?
Have you had a quick look on Google (www.google.com)?
Have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?
Have you checked the RadiusExpert wiki:
http://www.open.com.au/wiki/index.php/Main_Page

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
Includes support for reliable RADIUS transport (RadSec),
and DIAMETER translation agent.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.





More information about the radiator mailing list