[MediaWiki-l] User name "TammieDeLittle4" is usable, cannot create an anonymous actor for it.

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[MediaWiki-l] User name "TammieDeLittle4" is usable, cannot create an anonymous actor for it.

Jeffrey Walton
Hi Everyone,

We are getting about 11,000 of these due to a spammer getting in a
couple of years ago:

... log_id=4200
... log_id=4300
... log_id=4400
User name "Awpgkcm9ly0hjqagqrpl" is usable, cannot create an anonymous
actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this
situation.
...

$ grep -c 'anon' mw.txt
11748

I've tried manually cleaning them, but cleanupUsersWithNoId.php seems
to be missing them:

Error:
==========

# php maintenance/cleanupUsersWithNoId.php --dbuser=<user>
--dbpass=<passwd> --force --conf=LocalSettings.php

Notice: Undefined index: SERVER_NAME in
/var/www/html/w/includes/GlobalFunctions.php on line 1388
Notice: Undefined index: SERVER_NAME in
/var/www/html/w/includes/GlobalFunctions.php on line 1388
Param prefix required!

Cleans up tables that have valid usernames with no user ID

Usage: php cleanupUsersWithNoId.php
[--assign|--batch-size|--conf|--dbgroupdefault|--dbpass|--dbuser|--force|--globals|--help|--memory-limit|--mwdebug|--prefix|--profiler|--quiet|--server|--table|--wiki]
...

Try again:
==========

# php maintenance/cleanupUsersWithNoId.php --dbuser=<user>
--dbpass=<passwd> --prefix=* --force --conf=LocalSettings.php

Notice: Undefined index: SERVER_NAME in
/var/www/html/w/includes/GlobalFunctions.php on line 1388
Notice: Undefined index: SERVER_NAME in
/var/www/html/w/includes/GlobalFunctions.php on line 1388

But the entries persist.

I think I am not getting the options right. Here are the docs, but
they have not been helpful:
https://www.mediawiki.org/wiki/Manual:CleanupUsersWithNoId.php .

Does anyone know what switches I should be using to clean the unwanted users?

Jeff

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: [MediaWiki-l] User name "TammieDeLittle4" is usable, cannot create an anonymous actor for it.

Valerio Pelliccioni
Jeff,
I've tried in the maintenance directory (a minute ago):

vmp@tunearch:/var/www/w/maintenance# php cleanupUsersWithNoId.php --dbuser=<user> --dbpass=<pass> --force --prefix=* --conf=../LocalSettings.php
vmp@tunearch:/var/www/w/maintenance# php update.php

... and it works, at least for me with:
_________________________________________________
MediaWiki 1.33.1 (d35fba2)  15:11, December 17, 2019
PHP 7.2.17-0ubuntu0.18.04.1 (apache2handler)
MariaDB 10.1.38-MariaDB-0ubuntu0.18.04.1
__________________________________________________


Valerio Pelliccioni
W: https://tunearch.org/
 

On 19/12/2019, 21:13, "MediaWiki-l on behalf of Jeffrey Walton" <[hidden email] on behalf of [hidden email]> wrote:

    Hi Everyone,
   
    We are getting about 11,000 of these due to a spammer getting in a
    couple of years ago:
   
    ... log_id=4200
    ... log_id=4300
    ... log_id=4400
    User name "Awpgkcm9ly0hjqagqrpl" is usable, cannot create an anonymous
    actor for it. Run maintenance/cleanupUsersWithNoId.php to fix this
    situation.
    ...
   
    $ grep -c 'anon' mw.txt
    11748
   
    I've tried manually cleaning them, but cleanupUsersWithNoId.php seems
    to be missing them:
   
    Error:
    ==========
   
    # php maintenance/cleanupUsersWithNoId.php --dbuser=<user>
    --dbpass=<passwd> --force --conf=LocalSettings.php
   
    Notice: Undefined index: SERVER_NAME in
    /var/www/html/w/includes/GlobalFunctions.php on line 1388
    Notice: Undefined index: SERVER_NAME in
    /var/www/html/w/includes/GlobalFunctions.php on line 1388
    Param prefix required!
   
    Cleans up tables that have valid usernames with no user ID
   
    Usage: php cleanupUsersWithNoId.php
    [--assign|--batch-size|--conf|--dbgroupdefault|--dbpass|--dbuser|--force|--globals|--help|--memory-limit|--mwdebug|--prefix|--profiler|--quiet|--server|--table|--wiki]
    ...
   
    Try again:
    ==========
   
    # php maintenance/cleanupUsersWithNoId.php --dbuser=<user>
    --dbpass=<passwd> --prefix=* --force --conf=LocalSettings.php
   
    Notice: Undefined index: SERVER_NAME in
    /var/www/html/w/includes/GlobalFunctions.php on line 1388
    Notice: Undefined index: SERVER_NAME in
    /var/www/html/w/includes/GlobalFunctions.php on line 1388
   
    But the entries persist.
   
    I think I am not getting the options right. Here are the docs, but
    they have not been helpful:
    https://www.mediawiki.org/wiki/Manual:CleanupUsersWithNoId.php .
   
    Does anyone know what switches I should be using to clean the unwanted users?
   
    Jeff
   
    _______________________________________________
    MediaWiki-l mailing list
    To unsubscribe, go to:
    https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
   



_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: [MediaWiki-l] User name "TammieDeLittle4" is usable, cannot create an anonymous actor for it.

Jeffrey Walton
On Thu, Dec 19, 2019 at 3:31 PM Valerio Pelliccioni <[hidden email]> wrote:
>
> Jeff,
> I've tried in the maintenance directory (a minute ago):
>
> vmp@tunearch:/var/www/w/maintenance# php cleanupUsersWithNoId.php --dbuser=<user> --dbpass=<pass> --force --prefix=* --conf=../LocalSettings.php
> vmp@tunearch:/var/www/w/maintenance# php update.php
>
> ... and it works, at least for me with:

Thanks. Where are they coming from? maintenance/update.php is finding
them, but I can't.

Here is what I see when examining the MySQL tables.

MariaDB [my_wiki]> select count(*) from wikicryptopp_user;
+----------+
| count(*) |
+----------+
|        7 |
+----------+
1 row in set (0.00 sec)

MariaDB [my_wiki]> select count(*) from wikicryptopp_actor;
+----------+
| count(*) |
+----------+
|       13 |
+----------+
1 row in set (0.00 sec)

MariaDB [my_wiki]> select count(*) from wikicryptopp_user_groups;
+----------+
| count(*) |
+----------+
|        8 |
+----------+
1 row in set (0.00 sec)

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: [MediaWiki-l] User name "TammieDeLittle4" is usable, cannot create an anonymous actor for it.

Valerio Pelliccioni




Jeff,
given that 'BrownHairedGirl'  was one of my 'spammers', you can do something like this:

MariaDB [tta]> select rev_user, rev_user_text  FROM revision WHERE rev_user_text = 'BrownHairedGirl';

and you'll get something like this:

| rev_user | rev_user_text   |
----------------------------------------------
|        0 | BrownHairedGirl |
|        0 | BrownHairedGirl |
|        0 | BrownHairedGirl |
|        0 | BrownHairedGirl |
|        0 | BrownHairedGirl |
|        0 | BrownHairedGirl |
----------------------------------------------

Hope this helps!


Valerio Pelliccioni
W: https://tunearch.org
 

On 19/12/2019, 23:52, "Jeffrey Walton" <[hidden email]> wrote:

    On Thu, Dec 19, 2019 at 3:31 PM Valerio Pelliccioni <[hidden email]> wrote:
    >
    > Jeff,
    > I've tried in the maintenance directory (a minute ago):
    >
    > vmp@tunearch:/var/www/w/maintenance# php cleanupUsersWithNoId.php --dbuser=<user> --dbpass=<pass> --force --prefix=* --conf=../LocalSettings.php
    > vmp@tunearch:/var/www/w/maintenance# php update.php
    >
    > ... and it works, at least for me with:
   
    Thanks. Where are they coming from? maintenance/update.php is finding
    them, but I can't.
   
    Here is what I see when examining the MySQL tables.
   
    MariaDB [my_wiki]> select count(*) from wikicryptopp_user;
    +----------+
    | count(*) |
    +----------+
    |        7 |
    +----------+
    1 row in set (0.00 sec)
   
    MariaDB [my_wiki]> select count(*) from wikicryptopp_actor;
    +----------+
    | count(*) |
    +----------+
    |       13 |
    +----------+
    1 row in set (0.00 sec)
   
    MariaDB [my_wiki]> select count(*) from wikicryptopp_user_groups;
    +----------+
    | count(*) |
    +----------+
    |        8 |
    +----------+
    1 row in set (0.00 sec)
   



_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Reply | Threaded
Open this post in threaded view
|

Re: [MediaWiki-l] User name "TammieDeLittle4" is usable, cannot create an anonymous actor for it.

Jeffrey Walton
On Fri, Dec 20, 2019 at 3:17 AM Valerio Pelliccioni <[hidden email]> wrote:

>
> given that 'BrownHairedGirl'  was one of my 'spammers', you can do something like this:
>
> MariaDB [tta]> select rev_user, rev_user_text  FROM revision WHERE rev_user_text = 'BrownHairedGirl';
>
> and you'll get something like this:
>
> | rev_user      | rev_user_text   |
> ----------------------------------------------
> |        0 |    BrownHairedGirl |
> |        0 |    BrownHairedGirl |
> |        0 |    BrownHairedGirl |
> |        0 |    BrownHairedGirl |
> |        0 |    BrownHairedGirl |
> |        0 |    BrownHairedGirl |
> ----------------------------------------------

Thanks.

We found them in the logging table. We deleted the spammer's log entries with:

    DELETE FROM wikicryptopp_logging
    WHERE NOT EXISTS(SELECT NULL
        FROM wikicryptopp_user users
        WHERE users.user_name = log_user_text);

The query grabs the user's name from the logging table, and deletes
the row in the logging table if the user's name does not exist in the
user table.

For our wiki, the query deleted about 17,000 entries. After the query
cleanupUsersWithNoId.php ran as expected.

What got us in this state was, a spammer got in. We deleted all users
from the user table with id > 7. We had to recreate a few admin's
accounts, but it nuked all the spam accounts. So users table was clean
but logging table was dirty.

Jeff

_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l