Chris Parker wrote:

On Feb 1, 2005, at 3:58 PM, [EMAIL PROTECTED] wrote:

What is the best way to accomplish something like that:
(I hope this pseudocode is understandable)

If
  Username == "bob"
  and
  Password == "test"
  and
  (
   Calling-Station-Id == "123"
   or
   NAS-IP-Address == "1.2.3.4"
   or
   Another-Check-Attribute == "foo"
  )
Then
   Reply-Value = foo
   ...
Else
   Reject


4 Entries in the users file.

bob    Password == "test", Calling-Station == "123"
    Reply-Items = blah,
    ...,
    Fall-Through = no

bob Password == "test", NAS-IP-Address = "1.2.3.4"
    Reply-Items = blah,
    ...,
    Fall-Through = no

bob Password == "test", Another-Check-Attribute == "foo"
    Reply-Items = blah,
    ...,
    Fall-Through = no

DEFAULT Auth-Type := Reject


Ah, ok. This make sense when using a users file. At the moment I use SQL authentication, but because of the missing DEFAULT-record feature I have the migration to a flat users file in my mind for a long time.

This is the last kick to going on with it. Thx Chris!

--
Gerald


- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to