Thread:Project:Support desk/Trying to mass block/reply

Well, I looked around for a solution to this. Here's something I found:

The quickest and least invasive way to prevent a big list of registered users from making modifications is probably to do a bulk password change for the unwelcome users.

Assuming you're running a Unix-like, and that the list of folks you want to keep is relatively low:

Disable anonymous viewing and/or editing.

Dump a list of users from the database to a file.

eg., for MySQL:

mysql -p -u root -B wikidb -e 'select user_name from user;' | tee user.list Remove the users you want to keep from the user.list file.

Use the MediaWiki password command-line tool to change passwords to something random.

eg.

cd [wiki-docroot]/maintenance/ while read wikiuser; do    echo $wikiuser; php ./changePassword.php $wikiuser BOGUS%PASSblahblah77; done <user.list