I had created the attribute email_domain as a string field in the dictionary file before sending this help request. I read numerous discussions online regarding using an email address to determine which domain to authenticate against. I was not "just inventing things and expecting them to work" but using examples others shared that worked for them. Wayne Sprouse On Thu, Apr 10, 2025 at 1:01 PM Alan DeKok <aland@deployingradius.com> wrote:
On Apr 10, 2025, at 10:51 AM, Wayne Sprouse via Freeradius-Users < freeradius-users@lists.freeradius.org> wrote:
I want to set up my FreeRADIUS server to check the supplied user name and decide which DC to use for authentication. I have tried using the
following
code in my authorize section of a custom sites-enabled file.
# Check if the User-Name contains an email if ("%{User-Name}" =~ /@(.+)$/) { # Extract domain from email and store in email_domain set email_domain = "%{1}"
You can't just invent things and expect them to work. The configuration files and Unlang are extensively documented.
If you want to define local attributes, then read raddb/dictionary, and follow the instructions there.
Alan DeKok.
-- "The foregoing electronic message and any files transmitted with it are confidential and are intended only for the use of the intended recipient named above. This communication may contain material protected by the Family Educational Rights and Privacy Act (FERPA). If you are not the intended recipient, copying, distribution or use of the contents of this message is strictly prohibited. If you received this electronic message in error, please notify us immediately at (228-864-1146**)."**