[SOLVED] Issue with bulk removing FreeRADIUS users

Started by maekar, November 30, 2023, 11:24:12 AM

Previous topic - Next topic
November 30, 2023, 11:24:12 AM Last Edit: November 30, 2023, 01:52:08 PM by maekar
Hi!

We need to remove all users from the FreeRADIUS package once per year (to update from CSV later).

The problem is that selecting all of them and press "Delete selected" button in the GUI doesn't work. That only delete the last user. And if you select more than one user manually, the same thing happens.

We have more than 1000 users and deleting them one by one does not seem like an appropriate solution.

Can anyone replicate the problem? Is there any solution? Thanks in advance!

Maybe as an alternative, that sounds like a job you could do more efficiently with using the API probably?

https://docs.opnsense.org/development/api/plugins/freeradius.html

By using the client controller:
https://docs.opnsense.org/development/api/plugins/freeradius.html#id2
Hardware:
DEC740

November 30, 2023, 01:51:57 PM #2 Last Edit: November 30, 2023, 01:59:04 PM by maekar
Well, I did some testing with few users when I opened the thread.

Now I have done it with 1000 users and the result is quite different. By pressing the "apply" button (previously it was not pressed or it was not there), after a few seconds, a quite bunch of users are removed. Sometimes 100, sometimes 200. By repeating the process several times, the goal is achieved. Fair enough.

The funny thing is, the closer you get to zero users, the fewer users are removed when you hit apply.

The thread can be closed, thanks for the reply @Monviech.