using unlang to modify User-Name
rgreiner
mrgreiner at gmail.com
Tue Aug 26 22:36:10 CEST 2008
Hi,
using unlang I'm trying to modify the User-Name from the user, but
something isn't working. Could somebody give me a hand?
What I'm doing (sample):
authorize {
if (NAS-IP-Address == 1.2.3.4) {
update request {
User-Name = test2;
}
}
......
Freeradius -X is giving the following:
....
Listening on authentication address * port 1812
Listening on accounting address * port 1813
Listening on proxy address * port 1814
Ready to process requests.
rad_recv: Access-Request packet from host 1.2.3.4 port 13675, id=26,
length=61
User-Name = "test1 at domain.com"
User-Password = "teste"
NAS-IP-Address = 1.2.3.4
+- entering group authorize
++? if (NAS-IP-Address == 1.2.3.4)
? Evaluating (NAS-IP-Address == 1.2.3.4) -> TRUE
++? if (NAS-IP-Address == 1.2.3.4) -> TRUE
++- entering if (NAS-IP-Address == 1.2.3.4)
+++[request] returns notfound
++- if (NAS-IP-Address == 1.2.3.4) returns notfound
++[preprocess] returns ok
++[chap] returns noop
++[mschap] returns noop
rlm_realm: Looking up realm "domain.com" for User-Name =
"test1 at domain.com"
rlm_realm: Found realm "domain.com"
rlm_realm: Adding Stripped-User-Name = "test1"
rlm_realm: Adding Realm = "domain.com"
rlm_realm: Authentication realm is LOCAL.
++[suffix] returns ok
rlm_eap: No EAP-Message, not doing EAP
++[eap] returns noop
++[unix] returns updated
++[files] returns noop
++[expiration] returns noop
++[logintime] returns noop
++[pap] returns updated
rad_check_password: Found Auth-Type
auth: type "PAP"
+- entering group PAP
rlm_pap: login attempt with password "test"
rlm_pap: Using CRYPT encryption.
rlm_pap: User authenticated successfully
++[pap] returns ok
+- entering group post-auth
++[exec] returns noop
Sending Access-Accept of id 26 to 1.2.3.4 port 13675
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 0 ID 26 with timestamp +3
Ready to process requests.
I added the following to proxy.conf:
realm NULL {
}
realm domain.com {
}
The rest of the configuration files I left untouched.
--
-----------------------------------------------------
Marcos Roberto Greiner
Os otimistas acham que estamos no melhor dos mundos
Os pessimistas tem medo de que isto seja verdade
Murphy
-----------------------------------------------------
More information about the Freeradius-Users
mailing list