26 Jan
2010
26 Jan
'10
2:43 a.m.
Lucio Godoy wrote:
I have created this rule on the file sites-available/default on the authorize section:
if("%{User-Name}"){
Or just: if (User-Name) { The "unlang" docs say that means check if the attribute exists.
if ("%{User-Name}" =~ /^([^@]*)(@([-[:alnum:].]+))?$/){
Why not just: /^(.*)@(.*)$/ That's a lot simpler. You may need to put two '$$' in.
I am getting the user to authenticate as "user @ MAC_ADDRESS", and the REGEX is doing what is supposed to do, but the field Realm on the radacct table is not being updated with the MAC_ADDRESS it is empty, is the Digest-Realm the right attribute to be updated for the realm?
No. You need to update the "Realm" attribute. Alan DeKok.