Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-08-2012, 10:33 PM   #1
LQ Newbie
Registered: May 2012
Posts: 2

Rep: Reputation: Disabled
FreeRadius authenticate user by suffix

Hello everyone,

I have met a situation that, I have to give a usergroup which has same suffix such as "@abc" to use same password and same authentication method, and they need same destination, here is L2tp tunnel, such as:
Tunnel-Type = 3,
Tunnel-Medium-Type = 1,
Tunnel-Server-Endpoint = “”,
Tunnel-Private-Group-ID = “default”,
Tunnel-Assignment-ID = public
Is there anyone knowes that does freeradius support this kind of operation? Or is there any way to modify the source code to get the target?

Thank you for your help.
Old 05-13-2012, 08:03 PM   #2
LQ Newbie
Registered: May 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi, thanks for your viewing of my question. I have found the way of doing this. It's such an easy thing.
Just edit the "hints" configuration file under path /etc/raddb/ use regex to realm username, like this:
DEFAULT User-Name =~ "^[^@]+@(.+$)"
User-Name := "%{1}"
This tells the freeradius to rewrite the username matchs the pattern to the realm of the second part.
or you can limit the domains:
DEFAULT User-Name =~ "^[^@]+@(domain1|domain2)"
User-Name := "%{1}"
This means two usernames "domain1", "domain2".

After that, you can write user authentication and reply information in "users" file(or "radcheck" and "radreply" database table), with username the rewrited username by the realm.

Thanks Brad and Chris from katalix for helping.

Last edited by FightingYuman; 05-13-2012 at 08:04 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
freeradius User/Group ACL vikki Linux - Server 1 02-17-2011 08:19 AM
Freeradius Wireless unable to authenticate against MySQL Database nikalleyne Linux - Security 0 06-02-2009 09:12 AM
can not authenticate user with fedora 9 on login here Linux - Newbie 1 08-25-2008 02:49 AM
Why can't my user authenticate from RH Linux to Sun ONE DS using LDAP? Erikka Linux - Networking 1 08-24-2005 11:53 PM
vsftpd to authenticate ftp user thethakuri Linux - Networking 4 01-31-2003 03:49 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:11 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration