If you wanted to do mac authentication, is there a way to add a range of mac addresses to the users list. eg: #Normal mac username: 002710de63a4 Cleartext-Password := "002710de63a4" e806882925ce Cleartext-Password := "e806882925ce" #Range of mac addresses: 94ebcd****** Cleartext-Password := "94ebcd******" Dan.
On 29 Aug 2013, at 23:13, Dan Letkeman <danletkeman@gmail.com> wrote:
If you wanted to do mac authentication, is there a way to add a range of mac addresses to the users list. eg:
#Normal mac username:
002710de63a4 Cleartext-Password := "002710de63a4" e806882925ce Cleartext-Password := "e806882925ce"
#Range of mac addresses:
94ebcd****** Cleartext-Password := "94ebcd******"
DEFAULT User-Password =~ '^94ebcd[0-9a-f]{6}$', Auth-Type := Accept Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
Excellent. Thank you. On Thu, Aug 29, 2013 at 5:32 PM, Arran Cudbard-Bell < a.cudbardb@freeradius.org> wrote:
On 29 Aug 2013, at 23:13, Dan Letkeman <danletkeman@gmail.com> wrote:
If you wanted to do mac authentication, is there a way to add a range of mac addresses to the users list. eg:
#Normal mac username:
002710de63a4 Cleartext-Password := "002710de63a4" e806882925ce Cleartext-Password := "e806882925ce"
#Range of mac addresses:
94ebcd****** Cleartext-Password := "94ebcd******"
DEFAULT User-Password =~ '^94ebcd[0-9a-f]{6}$', Auth-Type := Accept
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On Thu, Aug 29, 2013 at 05:13:54PM -0500, Dan Letkeman wrote:
#Range of mac addresses:
94ebcd****** Cleartext-Password := "94ebcd******"
If you're using PAP (which I guess is most likely if it's MAC auth), you should be able to do something like DEFAULT User-Name =~ "^94ebcd", User-Password =~ "^94ebcd", Auth-Type := Accept Or, depending on the number of prefixes, forget the users file and just write it in unlang; maybe something like. if ( User-Name =~ /^94ebcd......$/ ) { update control { Cleartext-Password := "%{User-Name}" } } Be very careful with that one for obvious reasons... If you're doing CHAP (or something that needs the full cleartext password) then you're probably limited anyway, as the only way you're going to get the right cleartext password from a username in a range when you don't list them all is to refer to said username. Matthew -- Matthew Newton, Ph.D. <mcn4@le.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
participants (3)
-
Arran Cudbard-Bell -
Dan Letkeman -
Matthew Newton