key-networks / ztncui-containerized

A Docker image that contains ZeroTier One and ztncui to set up a standalone ZeroTier network controller with a web user interface in a container.
425 stars 83 forks source link

Admin Password not workin #22

Closed yashodhank closed 3 years ago

yashodhank commented 3 years ago

How to reset admin user password for Web UI when you are locked out? Thank you

key-networks commented 3 years ago

Could you let me know what command you used to instantiate the container?

yashodhank commented 3 years ago

Found workaround: Replace contents of this file with /opt/key-networks/ztncui/etc/passwd

docker exec -it $(docker ps -qf "name=zerotier") bash
# Run following inside docker container to replace existing `/opt/key-networks/ztncui/etc/passwd` file with default password
echo '{"admin":{"name":"admin","pass_set":false,"hash":"$argon2i$v=19$m=4096,t=3,p=1$/VYxjWHBzbkuCEO6Hh0AUw$nJaTJtth57vCAyYvg+UbtnscilR0UcE02AfLOhERe3A"}}' > /opt/key-networks/ztncui/etc/passwd
# Default username: admin and password: password

WARNING: Above command will overwrite your existing /opt/key-networks/ztncui/etc/passwd file. Make sure to backup if you have multiple users.

key-networks commented 3 years ago

Yes, I was going to suggest copying the default password file. Thanks for your feedback.