range of mac addresses

Matthew Newton mcn4 at leicester.ac.uk
Fri Aug 30 00:33:55 CEST 2013


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 at 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 at le.ac.uk>


More information about the Freeradius-Users mailing list