2015-03-10 - Re: Mass delete users

Header Data

From: Bob Hunt <bo***2@gmail.com>
Message Hash: 0f1ae1450a51396e23ef3a2af0d3b1c08eef444b0a154b10b2bbf1e80efdb18c
Message ID: <CAA-jMMQeRTrw9QfT1Pg-daQXYssu2j6E5A6p5EJPyPk5ZzGaFw@mail.gmail.com>
Reply To: N/A
UTC Datetime: 2015-03-10 15:01:51 UTC
Raw Date: Wed, 11 Mar 2015 09:01:51 +1100

Raw message

Hi Thomas,

For groupnames containing spaces, this should work;
usage: perl ./delete_all_users_in_a_group.pl "GROUP NAME"

Cheers,

Bob

Bob Hunt
20 Clarke Street
Wyndham
NSW 2550
Australia

Phone/fax 61 (0)2 64942030

On Tue, Mar 10, 2015 at 10:54 PM, Tomas213 <to***3@gmail.com> wrote:

> Bob, thanks for your help.
> I made a database backup, just in case, but everything seems to work just
> fine.
> Just a detail, the Group name has to be without space characters. I had to
> rename all my Groups in 1 word without spaces (like 1st_group, 2nd_group).
>
> Thank you.
>
> Tim, maybe there it is a good idea to add a new menu in admin panel with
> that kind of "dangerous" tips!
>
>
> Thomas
>
>
> On Tue, Mar 10, 2015 at 5:36 AM, Bob Hunt <bo***2@gmail.com> wrote:
>
>> usage: perl ./delete_all_users_in_a_group.pl GROUPNAME
>>
>>
>> Bob Hunt
>> 20 Clarke Street
>> Wyndham
>> NSW 2550
>> Australia
>>
>> Phone/fax 61 (0)2 64942030
>>
>> On Tue, Mar 10, 2015 at 2:33 PM, Bob Hunt <bo***2@gmail.com> wrote:
>>
>>> Hi Tomas,
>>>
>>> Deleting a group doesn't delete its users. I think they just drop down
>>> to belong to the next group in the list.
>>>
>>> But you can try this perl script which should do what you want.
>>>
>>> Scp the file to  /usr/share/grase/www/radmin/ on the grase server
>>> ssh into server & cd to  /usr/share/grase/www/radmin
>>> usage: ./perl delete_all_users_in_a_group.pl GROUPNAME
>>>
>>> This script deletes all users from the group listed in the script
>>> argument from the radius.radcheck, radius,radacct & radius.radusergroup
>>> database tables without archiving them.
>>>
>>> Cheers,
>>>
>>> Bob
>>>
>>>
>>> Bob Hunt
>>> 20 Clarke Street
>>> Wyndham
>>> NSW 2550
>>> Australia
>>>
>>> Phone/fax 61 (0)2 64942030
>>>
>>> On Tue, Mar 10, 2015 at 2:44 AM, tomas213 <to***3@gmail.com> wrote:
>>>
>>>> Anyone?
>>>>
>>>> ;-)
>>>>
>>>>
>>>> On Wednesday, March 4, 2015 at 5:51:39 PM UTC+2, tomas213 wrote:
>>>>>
>>>>> Hello.
>>>>>
>>>>> Any ideas how to mass delete users?
>>>>> If i delete a group, will it delete it's users too?
>>>>>
>>>>>
>>>>> Thomas
>>>>>
>>>>  --
>>>> This mailing list is for the Grase Hotspot Project
>>>> http://grasehotspot.org
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Grase Hotspot" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to gr***e@grasehotspot.org.
>>>> To post to this group, send email to gr***t@grasehotspot.org.
>>>> Visit this group at
>>>> http://groups.google.com/a/grasehotspot.org/group/grase-hotspot/.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/00ed3f5a-b4f2-4f34-a75e-00d111582d7a%40grasehotspot.org
>>>> <https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/00ed3f5a-b4f2-4f34-a75e-00d111582d7a%40grasehotspot.org?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>>
>>>
>>  --
>> This mailing list is for the Grase Hotspot Project
>> http://grasehotspot.org
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Grase Hotspot" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to gr***e@grasehotspot.org.
>> To post to this group, send email to gr***t@grasehotspot.org.
>> Visit this group at
>> http://groups.google.com/a/grasehotspot.org/group/grase-hotspot/.
>> To view this discussion on the web visit
>> https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/CAA-jMMQKE-YrHMJJWNB938MSd17Fq28EZa2LwG%3DN_A9%2BsQxoYw%40mail.gmail.com
>> <https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/CAA-jMMQKE-YrHMJJWNB938MSd17Fq28EZa2LwG%3DN_A9%2BsQxoYw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>  --
> This mailing list is for the Grase Hotspot Project http://grasehotspot.org
> ---
> You received this message because you are subscribed to the Google Groups
> "Grase Hotspot" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to gr***e@grasehotspot.org.
> To post to this group, send email to gr***t@grasehotspot.org.
> Visit this group at
> http://groups.google.com/a/grasehotspot.org/group/grase-hotspot/.
> To view this discussion on the web visit
> https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/CAPz6xh7cDSDXLgvLeGvThno3n8fd4Aom_Wbap-1HEMuF-n1zaA%40mail.gmail.com
> <https://groups.google.com/a/grasehotspot.org/d/msgid/grase-hotspot/CAPz6xh7cDSDXLgvLeGvThno3n8fd4Aom_Wbap-1HEMuF-n1zaA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

Thread