yhkz

yhkz

Docker Protainer visual platform, forgot login password, reset password

Original link

Docker Portainer Visualization Platform, Forgot Login Password, Reset Password.#

This article describes in detail how to reset the password after forgetting the Portainer login password by stopping the container, finding the data path, resetting the password, and restarting the service, ultimately completing the password reset and verifying the new password.

Abstract generated by CSDN using intelligent technology.

Since I haven't logged into the Portainer system for a long time, I forgot the login password and tried many common passwords without success, so I had no choice but to reset the password.
image

1. Stop the Portainer Container#

Check the container ID and COMMAND to stop the container.

docker ps -a

Insert image description here
Stop the container.

docker stop portainer

Insert image description here

2. Find the Path of Volume Data on the Host#

docker inspect portainer # Find "Source":
find / -name portainer.key

Insert image description here
/var/lib/docker/volumes/portainer_data/_data/ This path is needed when using the reset command.

3. Reset Password#

docker run --rm -v /var/lib/docker/volumes/portainer_data/_data:/data portainer/helper-reset-password # Replace source address

docker run --rm -v /var/lib/docker/volumes/0e304ccd0c1c26495c60e458a02997f0568719b6df8388ae82418915d11cad9e/_data:/data portainer/helper-reset-password # Local address

Insert image description here
The output contains the username and password; remember to copy the password, as it will be needed when changing the user password.

4. Start the Container#

systemctl start docker

Check if the container started successfully.

docker ps -a

Insert image description here

5. Log in to Portainer#

Portainer login address http://IP:9000, username admin, password is the long string of password after the reset is completed.
image

Click the user to reset the password; the current password is the long string of password after the reset is completed. After entering the new password twice, click to change the password. Refresh and log in again to verify if the modified password is correct, then remember the password.
image

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.