convert mac adresses to lower case

ironrake at ironrake at
Mon Sep 20 15:26:20 CEST 2010

I beieve there is a lower() function you can use in the sql statement.
Sent from Verizon Wireless

-----Original Message-----
From: PENZ Robert <ROBERT.PENZ at>
Sender: at
Date: Mon, 20 Sep 2010 14:11:14 
To: FreeRadius users mailing list<freeradius-users at>
Reply-To: FreeRadius users mailing list <freeradius-users at>
Subject: convert mac adresses to lower case


I'm running

# rpm -qa | grep radius

and I've different switch types. Some send the MAC address lower case the others upper case. For switches which send it lower it case it works (as the macs are stored lower case in the db). How can I convert them all in the clear text password attribute to lower case? The attr_rewrite module looks good, but the only way I see is to have 6 rewrite rules each replacing one letter, but that seems inefficient. The matching in the SQL Database works case insensitive and returns a row but the pap check logs following:

rlm_sql (sql): Released sql socket id: 1
+++[sql] returns ok
++- policy redundant returns ok
++[expiration] returns noop
++[logintime] returns noop
++[pap] returns updated
Found Auth-Type = PAP
+- entering group PAP {...}
[pap] login attempt with password "0025B3A013AA"
[pap] Using clear text password "0025b3a013aa"
[pap] Passwords don't match
++[pap] returns reject
Failed to authenticate the user.

I tried to remove pap but then I get following

+++[sql] returns ok
++- policy redundant returns ok
++[expiration] returns noop
++[logintime] returns noop
WARNING: Please update your configuration, and remove 'Auth-Type = Local'
WARNING: Use the PAP or CHAP modules instead.
User-Password in the request does NOT match "known good" password.
Failed to authenticate the user.

Hope someone can help me. Thx!

Mit freundlichen Grüßen
Robert Penz

Dipl. Inf. Robert Penz
DVT-Daten-Verarbeitung-Tirol GmbH
Adamgasse 22, 6020 Innsbruck
Tel: +43 512 508 3334 / Fax: +43 512 508 3355
eMail: robert.penz at

List info/subscribe/unsubscribe? See

More information about the Freeradius-Users mailing list