vmps documentation?

bmccorkle network.administrator at gahanna.gov
Tue Apr 1 18:42:35 CEST 2008


Phil Mayers wrote:
>Normally you simply configure the module correctly i.e. prefix the key with
a * and reply items with = as per "man rlm_passwd"
>
>modules {
>  passwd mac2vlan {
>     filename = /etc/raddb/mac2vlan
>     format = "*MyMac:=VMPS-VLAN-Name"
>     hashsize = 100
>   }
>}
>
>...then call that module in your unlang section:
>
>vmps {
>   ... stuff
>   # now call the passwd module
>   mac2vlan
>}
>
>...however, the "vmps" section is really a re-named "post-auth" section,
and the rlm_passwd module does not have a post-auth >handler; so you need (I
think) to do this:
>
>vmps {
>   ...stuff
>   # call the passwd "authorize" method
>   mac2vlan.authorize
>}
>
>This is not documented AFAICT, but I've seen Alan mention it in a mailing
list post and the code seems to be present in 2.0.3

Ok, that let me get it working.  I had to use mac2vlan.authorize instead of
just the module name.  Perhaps I should have mentioned I'm running 2.0.1 on
FreeBSD (2.0.3 doesn't seem to be available on the ports collection yet).  

I still have one more problem.  I want it to call the mac2vlan module and if
the mac address isn't found in the file, assign our public vlan group to the
VMPS-VLAN-Name attribute.  So I am trying to get the module return code from
mac2vlan.  But when I do the following...

server vmps {

   ... stuff

   vmps {

      ... stuff

      mac2vlan.authorize

      If (!ok) {
         update reply {
            VMPS-VLAN-Name = "Public"
         }
      }
   }
}

The server refuses to start at all until I comment out the if statement. 
Did I forget to read something on module return codes or am I calling it
wrong?
-- 
View this message in context: http://www.nabble.com/vmps-documentation--tp16315996p16418725.html
Sent from the FreeRadius - User mailing list archive at Nabble.com.




More information about the Freeradius-Users mailing list