Re: Exec-Program based on LDAP Attribute

2007-09-26 Thread John Wever
Yes, thats exactly what I want, but the script is never fired. It is my 
understanding that the acct_users file only sees accounting packet data, 
if the CustomAttrib is a checkItem would it even be available to query 
at this point?


Just as info, I take off the , CustomAttrib == true and the script 
fires as expected for all authenticated users.


Alan DeKok wrote:

John Wever wrote:

DEFAULT Acct-Status-Type == Start, CustomAttrib == true


  That *matches* the Custom Attribute.  Is that what you want?


   Exec-Program = /path/to/script.sh %u %{Framed-IP-Address}
%{CustomAttrib}

I've tried setting the ItemType of the CustomAttrib to checkItem and
replyItem, but neither method worked. My script needs access to the
username and the Framed-IP-Address.

Any suggestions?


  Read doc/variables.txt to see how to refer to attributes in the reply
or check item list.

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



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


Exec-Program based on LDAP Attribute

2007-09-25 Thread John Wever
I need to be able to fire off a script via the Exec-Program (or some 
other method) based upon a successful authentication and the value of an 
LDAP attribute on the user's account. I tried putting the following in 
the acct_users...


DEFAULT Acct-Status-Type == Start, CustomAttrib == true
   Exec-Program = /path/to/script.sh %u %{Framed-IP-Address} 
%{CustomAttrib}


I've tried setting the ItemType of the CustomAttrib to checkItem and 
replyItem, but neither method worked. My script needs access to the 
username and the Framed-IP-Address.


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