Hi..
I searched thru the forums but not getting the right username after using
regex.
The request I am getting is : [EMAIL PROTECTED] and I need to strip everything
after @ and pass the username as test.
I am using ldap for auth. This is the config I have in ldap.
if (User-Name =~ /^([EMAIL PROTECTED])(@.*)$/) { // just want
to dblchck is the right regex
update request {
Stripped-User-Name := "%{0}"
}
}
filter = "(uid=%{Stripped-User-Name})"
//filter = "(uid=%{Stripped-User-Name:-%{User-Name}})"
//filter = "(uid=%{Stripped-User-Name})"
encryption_scheme = crypt
I get the following while ldap lookup expand: (uid=%{Stripped-User-Name}) ->
(uid=)
Here is the radius -X log ;
rad_recv: Access-Request packet from host 216.2.193.1 port 55751, id=107,
length=65
User-Name = "[EMAIL PROTECTED]"
User-Password = "test123"
+- entering group authorize
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
rlm_realm: Looking up realm "google.com" for User-Name = "[EMAIL PROTECTED]"
rlm_realm: No such realm "google.com"
++[suffix] returns noop
rlm_eap: No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns notfound
++[files] returns noop
++- entering group
rlm_ldap: - authorize
rlm_ldap: performing user authorization for [EMAIL PROTECTED]
expand: (uid=%{Stripped-User-Name}) -> (uid=)
expand: dc=xyz,dc=net,o=internet -> dc=xyz,dc=net,o=internet
rlm_ldap: ldap_get_conn: Checking Id: 0
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html