help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnu-radius] NOT writing wtmp record


From: Sergey Poznyakoff
Subject: Re: [Help-gnu-radius] NOT writing wtmp record
Date: Thu, 18 Mar 2004 16:57:48 +0200

Sebastian Hagedorn <address@hidden> wrote:

> The guys running the Shivas argue that our RADIUS should use the
> session ID in order to match accounting requests to access
> requests. Could that be done with a rewrite function?

Yes, here's the algorithm:

1. If your radius runs only accounting and the NASes never send
meaningful User-Name attributes, then the following line in raddb/hints
will suffice:

# raddb/hints
DEFAULT Replace-User-Name = "%C{Acct-Session-Id}" NULL

2. Otherwise, use the following approach. Create a file with
the following contents:

integer
foo()
{
        if (%[User-Name] == "" && *%[Acct-Session-Id])
                %[Orig-User-Name] = %[Acct-Session-Id];
        else
                %[Orig-User-Name] = %[User-Name];
        return 0;
}

For the sake of example I assume you save it in /some/path/foo.rw

To the `rewrite' section of your raddb/config add the following
statement:

        load "/some/path/foo.rw";

To your raddb/hints add the following:

DEFAULT Rewrite-Function = foo  Fall-Through = Yes
DEFAULT Replace-User-Name = "%C{Orig-User-Name}" NULL


Regards,
Sergey


        





reply via email to

[Prev in Thread] Current Thread [Next in Thread]