Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Freeradius package - user expiration not working (FIX)

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 2 Posters 5.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      Slam
      last edited by

      Hello,

      when using freeradius package from pfsense, certain attributes for users arent saved to /usr/local/raddb/users when editing via webgui, like expiration and I think simultaneous-use logins, after a little digging I found very easy fix for atleast expiration.

      Install freeradius as usual then ssh in to your firewall, vi  /usr/local/pkg/freeradius.inc, go to line 459

            if ($x <> '') {
      

      change to

            if ($userexpiration <> '') {
      

      Ive tried to fix Simultaneous-Use but no matter what I change, the option isnt saved to the users file, as I dont know really much about php, hopefully someone more experience can have a look.

      I finally found the problem why simulaneous-use wont write to the user file, I swear I checked the same line a dozen times, oh well heres the simple fix.

      edit line 456

              if ($multiconnect";
      

      change to

              if ($multiconnet";
      

      I dont know if simulaneous-use actually works so if someones applies these fixes, feedback would help

      tested with radlogin 4.0.28 & pfs 1.2.3-RC1 built on Sun May 31 16:28:51 EDT 2009

      slam

      edit: fixed line number typo's

      1 Reply Last reply Reply Quote 0
      • S Offline
        Slam
        last edited by

        bumped with new details

        1 Reply Last reply Reply Quote 0
        • S Offline
          Slam
          last edited by

          I have tried to install freeradius package on pfsense 2.0 (Tue Jun 9 14:13:31 FBSD 7.2), once I rebooted I noticed an error on startup.

          Fatal error: Call to undefined function convert_friendly_interface_to_real_interface_name() in /usr/local/pkg/freeradius.inc on line 42
          Executing rc.d items...
           Starting /usr/local/etc/rc.d/radiusd.sh...
          done.
          
          

          to fix this vi /usr/local/pkg/freeradius.inc and addrequire_once('filter.inc');right after line 3, it should now read```
          require_once('service-utils.inc');
          require_once('config.inc');
          require_once('filter.inc');

          
          reboot
          1 Reply Last reply Reply Quote 0
          • H Offline
            hadi57
            last edited by

            freeRADIUS is not starting with me i am using 1.2.3, even after adding the line:
            require_once('filter.inc');

            1 Reply Last reply Reply Quote 0
            • S Offline
              Slam
              last edited by

              @hadi57:

              freeRADIUS is not starting with me i am using 1.2.3, even after adding the line:
              require_once('filter.inc');

              I downloaded latest snapshot of pfsense 1.2.3 and applied same changes and it worked fine, the "require_once('filter.inc');" was only meant for version 2 if you read more closely, but I think this might not be an issue anymore with ver 2.0.

              The best advice I can give is to uninstall radius, rm -rf /usr/local/etc/raddb and reinstall radius again, then apply the 2 fixes above (for verion 1.2.3).

              you can also run radius in debug mode from console "radius -X" and see if you have any errors there.

              Hope that helps

              Slam

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.