title: Freeradius Max-Daily-Session in custom authentication
body: <p>Actually i have AAA by mysql and everything work fine. Especially the use <strong>Max-Daily-Session</strong> attribute to disconnect the user after 10min (600sec) connection.
  I recently changed the way authenticazione using a custom php script.
  In sites-enabled/default file:</p>
  
  <pre><code>authorize{
  update control { 
      Auth-Type := `/usr/bin/php -f /etc/raddb/yourscript.php '%{User-Name}' '%{User-Password}' '%{Client-IP-Address}'`
  }
  </code></pre>
  
  <p>In /etc/freeradius/users:</p>
  
  <pre><code>DEFAULT Auth-Type = Accept
  Exec-Program-Wait = "/usr/bin/php -f  /etc/raddb/attributes.php '%{User-Name}' '%{User-Password}' '%{Client-IP-Address}'"
  </code></pre>
  
  <p>In attributes.php:</p>
  
  <pre><code>&lt;?php
  $User = $argv[1];
  $Pass = $argv[2];
  $Ip   = $argv[3];
  if ($User == "test")
      echo "Max-Daily-Session:=600";
  ?&gt;
  </code></pre>
  
  <p>It seems that the server does not care about the Max-Daily-Session attribute and does not send the Packet of Disconnect. What changes between mysql and custom authentication?</p>