Docker Administration: MediaWiki Password Reset: Difference between revisions
(Created page with "<markdown> # Docker Administration: MediaWiki Password Reset This guide provides step-by-step instructions on how to reset a MediaWiki user's password using Docker. ## Steps ### 1. Log in to the Host First, log in to the host machine where the MediaWiki Docker containers are running. ```sh login to soylent-host-0 # su devops # cd /home/devops/mediawiki ``` ### 2. Check Docker Containers List the running Docker containers to ensure the MediaWiki services are up and...") |
m (Admin moved page Docker Notes MediaWiki to Docker Administration: MediaWiki Password Reset without leaving a redirect) |
(No difference)
|
Latest revision as of 22:47, 24 November 2024
Docker Administration: MediaWiki Password Reset
This guide provides step-by-step instructions on how to reset a MediaWiki user's password using Docker.
Steps
1. Log in to the Host
First, log in to the host machine where the MediaWiki Docker containers are running.
login to soylent-host-0
# su devops
# cd /home/devops/mediawiki
2. Check Docker Containers
List the running Docker containers to ensure the MediaWiki services are up and running.
devops@soylent-host-0:~/mediawiki$ docker compose ps
You might see warnings about unset environment variables and obsolete attributes. Ignore these for now.
3. Access the Database Container
Execute a bash shell inside the database container.
# docker compose exec -it database /bin/bash
4. Retrieve Database Credentials
Inside the database container, retrieve the MariaDB credentials.
root@bc3520c0d843:/# env | grep MARIA
5. Log in to MariaDB
Log in to the MariaDB database using the retrieved credentials.
# mariadb -u soylentnews -p mediawiki
When prompted, enter the non-root password.
6. Query the User Table
Check the aex_user
table to find the user whose password needs to be reset.
MariaDB [mediawiki]> show tables;
MariaDB [mediawiki]> select * from aex_user limit 1;
7. Find the User by Email
If the user is not found by name, search by email. Note that the aex_user
table is case-sensitive.
MariaDB [mediawiki]> select * from aex_user where user_email like '%anrin%';
8. Reset the Password
Exit the database container and access the MediaWiki container.
# devops@soylent-host-0:~/mediawiki$ docker compose exec -it mediawiki /bin/bash
Run the password reset script inside the MediaWiki container.
root@1ccb2d87367d:/var/www/html# php ./maintenance/run.php changePassword.php --user=mrcoolbp --password=password
9. Completion
The password for the user mrcoolbp
has been successfully reset.
Password set for Mrcoolbp
All done.