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

    FreeRadius User Import ?

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 2 Posters 8.3k 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.
    • J Offline
      Justinw
      last edited by

      I need to import a large list of users into radius.  Already wrote a script to match the current formatting found in /usr/local/etc/raddb/users, but even when adding one user just by hand, that username/pass are rejected.  Does anyone know of a good way to import a larger list of users (50 plus)?  Is there some other files that it takes the actual list from that I am missing?

      This is the output from radius -X when I try and start it with the added entry:

      /usr/local/etc/raddb/users[2]: Parse error (check) for entry test2: Expected end of line or comma
      Errors reading /usr/local/etc/raddb/users
      radiusd.conf[160]: files: Module instantiation failed.
      radiusd.conf[297] Unknown module "files".
      radiusd.conf[286] Failed to parse authorize section.

      this is what my user files looks like:

      test1 User-Password == "password"
      test2 User-Password == "password"

      Thanks in advance

      1 Reply Last reply Reply Quote 0
      • J Offline
        jeroen234
        last edited by

        you need to add youre list to the ones in the config.xml
        from that is the freeradius user file list made up on boot

        1 Reply Last reply Reply Quote 0
        • J Offline
          Justinw
          last edited by

          I think I got it, in VI it was showing some escapce characters improperly.  When I used the built in editor in PFsense and removed them it read the file.  I also pointed radius to a different user file in freeradius.inc and radiusd.conf so they would read the file I'm going to generate.  If I'm not mistaken this will effectively break the gui user admin and allow me to work with just the text file anyways…?  Kind of ghetto but it should work right?

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