[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Removing all user accounts with no deposits
- Subject: [EP-tech] Removing all user accounts with no deposits
- From: drn at ecs.soton.ac.uk (David R Newman)
- Date: Tue, 12 May 2020 11:15:40 +0100
- In-reply-to: <EMEW3|af21713e03e00c1c4b4685aac358d127w4BA8Y14eprints-tech-bounces|ecs.soton.ac.uk|CAMKPGpVYEM7xmufsAAearHuOr8_uSDdDvke1v01osAXWK6R=cQ@mail.gmail.com>
- References: <CAMKPGpVYEM7xmufsAAearHuOr8_uSDdDvke1v01osAXWK6R=cQ@mail.gmail.com> <CAMKPGpVYEM7xmufsAAearHuOr8_uSDdDvke1v01osAXWK6R=cQ@mail.gmail.com> <EMEW3|af21713e03e00c1c4b4685aac358d127w4BA8Y14eprints-tech-bounces|ecs.soton.ac.uk|CAMKPGpVYEM7xmufsAAearHuOr8_uSDdDvke1v01osAXWK6R=cQ@mail.gmail.com> <ab13ee3c-c8ef-d31e-1b14-9b24345f3521@ecs.soton.ac.uk>
Hi Martin,
Yes, this is the correct method for deleting users if they have no
deposits.? If they did, I would recommend transferring ownership of
deposits before removing a user.? I am assuming you have quite a long
list so you cannot go the "Manage Records -> Users -> Remove" option
would be overly time consuming. Therefore you need will need to write a
somewhat bespoke script for doing this, like the one at:
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdrn.eprints-hosting.org%2Fstuff%2Fremove_users&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=0Mnswe8v3sXtQINQXCYueNDXu%2B0zhrOIkAmQmhsEJf4%3D&reserved=0
You will need to put this in the bin directory of your archive, make it
executable and run as follows:
./remove_users ARCHIVE_NAME USER_LIST_FILENAME
Substitute ARCHIVE_NAME for your archive's name and USER_LIST_FILENAME
for the filename(and path) or a file containing new line separated user
IDs, e.g.
2
5
7
11
28
Regards
David Newman
On 12/05/2020 10:06, Martin Hawksey via Eprints-tech wrote:
> Hello all,
>
> Sorry to join the list with what is probably a noob question. Our
> eprints repo has a number of spam accounts and we would like to remove
> all user accounts with no live deposits. Via the deposit and user
> reporting I'm happy I can create a list of user id's for removal but
> then I reach the limits of my understanding,?not being a Perl user/dev.
>
> I've looked on the wiki and more widely for a solution and I can find
> some snippets like
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FAPI%3AEPrints%2FDataObj%2FUser%23remove&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=1t%2Bu4IW3jyuYBblxs6fCs3zxGKcfbF8FPn0nCXONZpI%3D&reserved=0
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FAPI%3AEPrints%2FDataObj%2FUser%23remove&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=1t%2Bu4IW3jyuYBblxs6fCs3zxGKcfbF8FPn0nCXONZpI%3D&reserved=0>
>
>
> I was wondering if anyone on the list has had to go through a similar
> process and has a script they can share?
>
> Many thanks
> Martin
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=jUeV8BYqMCes%2BZN89lZHdCCYMV83c9KZnq2Kwq6s9V0%3D&reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=QcgZjgGQr8EXUHQoPZlw6pPKGgQ6nCszgbr9XFNv%2BCI%3D&reserved=0
--
This email has been checked for viruses by AVG.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com%2F&data=01%7C01%7C%7C9ca1c219bce34cdca64608d7f65d6c47%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=V8OX3wDmCRlvzOUnRrwwhM6mBFXURtj2c9y6rjGr2Dg%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200512/1e2e280f/attachment.html