Portainer 密码重置

Portainer 密码重置

# Step 1  Get Portainer ID
docker ps -a | grep portainer | awk '{print $1}'

# Step 2 Stop Portainer
docker stop {Portainer_container_id}

# Step 3 Install "help-reset-password"
docker pull portainer/helper-reset-password

# Step 4 Get Portainer Data_dir
docker inspect 7e91dc6f8337|grep -i "source"

"Source": "/var/lib/docker/data/portainer"

# Step 5 reset password
docker run --rm -v  /var/lib/docker/data/portainer:/data portainer/helper-reset-password
time="2022-12-01T13:52:51Z" level=info msg="Loading PortainerDB: portainer.db"
time="2022-12-01T13:52:51Z" level=info msg="Opened existing store" version=22
2022/12/01 13:52:51 [WARN] Unable to retrieve user with ID 1, will try to create, err: object not found inside the database
2022/12/01 13:52:51 Admin user admin successfully created
2022/12/01 13:52:51 Use the following password to login: e=/0]-9rdanM4Nj`%rQ8o71Z3S{i!Ia5

# Step 6 Start Portainer
docker start {Portainer_container_id}

posted @ 2022-12-01 22:03  oldSimon  阅读(454)  评论(0编辑  收藏  举报