Re: Fwd: Regular expression - Trying to rewrite User-Name
It is difficult to see what your machine is doing since you are giving us bits and pieces of the problem and out of order. Damian Porter wrote: thanks for all you input so far, and i am still looking, trying to use the hint and huntgroup file for a work around so success yet. By the way i should mention the code worked perfectly well with redhat 9. [00-0423-236767-676752-6752-52] What is that number? Is that the resulting username after your regex? the first and the last octet works, its just {2} - {5} that acting up. additional information my auth-log file Packet-Type = Access-Request Thu May 11 18:33:02 2006 NAS-IP-Address = 1.5.1.32 http://1.5.1.32 User-Name = 00042367672f User-Password = 00042367672f Calling-Station-Id = 00042367672F Called-Station-Id = 000B8602DD80 NAS-Port = 0 NAS-Port-Type = Wireless-802.11 Vendor-14823-Attr-5 = 0x4e5355 Vendor-14823-Attr-6 = 0x302e302e30 Client-IP-Address = 1.5.1.3 http://1.5.1.3 Is that a different username than the munged one above? Can you make sure to provide details from the same username, so it is easier to follow and see what exactly is wrong? Debug output There appears to be another RADIUS server running on the authentication port 1814 One of two things is happening. Either there is a radius server already running and it has been running all the time and any changes you are making are not being seen. Or you forgot to stop the radius daemon before trying to run it in debug mode. Try this: killall -9 radiusd radiusd -X Now, leave that running and send it an access request. Send us everything from where you typed radiusd -X to the *end* of the request (presumably a reject statement). radiusd -X should not release back to a prompt, it should sit there waiting for a request. If you get a prompt back, then there is either still something running on that port or something else caused it to error out. *After* you send a request and it gets rejected, Control-C will get your prompt back and terminate the radiusd -X. -- Dennis Skinner Systems Administrator BlueFrog Internet http://www.bluefrog.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Fwd: Regular expression - Trying to rewrite User-Name
Damian Porter wrote: the user-name is coming to the radius process without any dashes and i want to add dashes to separate the octets. I have looked an that document and it does not offer a solution for the problem. Are you responding to me? 0e35-353afe-3afe19-fe19 has dashes. Either it came that way or your regex works (at least partially). If it came that way, then your searchfor will never work because it is not expecting those dashes. If it didn't come that way, I'd be surprised because it doesn't look like your regex should do that. Try running the server in debug mode and send us the output. You may be surprised by what it tells you. As to the link, look again. It wasn't meant to fix your regex, it was meant to suggest an alternative way to do what you are doing (you still need to figure out the regex). It has instructions on how to rewrite a username using regex (exactly what you are trying to do) with just the hints file. It is a bit more elegant and will likely rewrite the username sooner in the processing, allowing you to use the new username in huntgroups, etc. -- Dennis Skinner Systems Administrator BlueFrog Internet http://www.bluefrog.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Fwd: Regular expression - Trying to rewrite User-Name
On Thursday 11 May 2006 16:30, Dennis Skinner wrote: Damian Porter wrote: the user-name is coming to the radius process without any dashes and i want to add dashes to separate the octets. I have looked an that document and it does not offer a solution for the problem. Are you responding to me? 0e35-353afe-3afe19-fe19 has dashes. Either it came that way or your Yes, he is. Mr Porter has 0e353afe19xx coming in. He wants 0e-35-3a-f3-19-xx. His replacement is not working as he wishes. He is wanting ([a-z0-9]{2}) ... to break up the 12 character string into 6 groups of 2 and then insert dashes between them. I don't have the answer, but that is the problem as I see it. Zoltan Ori - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Fwd: Regular expression - Trying to rewrite User-Name
Zoltan Ori wrote: On Thursday 11 May 2006 16:30, Dennis Skinner wrote: Are you responding to me? Yes, he is. I was subtly suggesting he should include relevant text in his responses like I am doing. If someone searches the archives later, they have no context for his message. Mr Porter has 0e353afe19xx coming in. I don't think he does. Hence my response and request for debug output. His regex won't do that and I don't know of anything else that would munge the username like that. -- Dennis Skinner Systems Administrator BlueFrog Internet http://www.bluefrog.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html