Stripping domain from username

Nicholas Hall ngharo at gmail.com
Tue Aug 7 22:41:47 CEST 2007


Alan - Thanks!  Worked like a charm.

unlang looks very cool and powerful addition to FreeRADIUS... the
documentation is awesome too.  Great job!

On 8/7/07, Alan DeKok <aland at deployingradius.com> wrote:
>
> Nicholas Hall wrote:
> > According to what I've read the HINTS file is the best place to do
> > this.  Here is relevant portions of my config running CVS from
> > 2007-08-01.  It's my understanding that with Strip-User-Name = Yes,
> > FreeRADIUS will rewrite the User-Name attribute without the domain
> > specified.
>
>   The server doesn't do that.  You've got to tell it what part is the
> username, and what part is the domain name.
>
> >
> ----------------------------------------------------------------------------------------
> > DEFAULT Suffix == "@alexssa.net", Strip-User-Name = Yes
>
>   In the CVS head, you can use the new "unlang" feature, in the
> "authorize" section:
>
> authorize {
>         ...
>         if ("%{User-Name}" =~ /^(.*)@alexssa.net$/) {
>                 update request {
>                         Stripped-User-Name = "%{1}"
>                 }
>         }
>         ...
>
>   See "man unlang" for details.
>
>   Alan DeKok.
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>



-- 
Nicholas Hall
ngharo at gmail.com
262.208.6271
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20070807/ed51ef1b/attachment.html>


More information about the Freeradius-Users mailing list