Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Admin Password reset mechanism? #30

Closed
Exist2Resist opened this issue Mar 25, 2021 · 5 comments
Closed

Server Admin Password reset mechanism? #30

Exist2Resist opened this issue Mar 25, 2021 · 5 comments

Comments

@Exist2Resist
Copy link

Exist2Resist commented Mar 25, 2021

Hey I've been using your container for 5 years, thanks for all the work you are putting into it.
Recently built a new PC and forgot to backup my admin account settings.

I can not reset my admin password using these instructions:
https://support.teamspeak.com/hc/en-us/articles/360002712898-How-do-I-change-or-reset-the-password-of-the-serveradmin-Server-Query-account-

If there isn't one yet, would it be possible to bake in a mechanism for resetting the admin password?
Perhaps similar to when the license file exists in the data dir, if a .admin_reset file exists with a one line value that is your new password inside said file, the bash script executes by appending the start script with serveradmin_password=test1234 where test1234 is the value inside the .admin_reset file.

@mbentley
Copy link
Owner

If I am reading this correctly, this should be possible already. Say I created a teamspeak container using the following command:

docker run -d --restart=always --name teamspeak \
  -e TS3SERVER_LICENSE=accept \
  -p 9987:9987/udp -p 30033:30033 -p 10011:10011 -p 41144:41144 \
  -v teamspeak:/data \
  mbentley/teamspeak

I can stop the existing container:

docker stop teamspeak

And then run a temporary container with a different name with the serveradmin_password setting appended:

docker run -it --rm --name teamspeak-reset \
  -e TS3SERVER_LICENSE=accept \
  -p 9987:9987/udp -p 30033:30033 -p 10011:10011 -p 41144:41144 \
  -v teamspeak:/data \
  mbentley/teamspeak \
  serveradmin_password=test1234

Log output:

Found a license agreement method; launching TeamSpeak
2021-03-25 10:21:22.543522|INFO    |ServerLibPriv |   |TeamSpeak 3 Server 3.13.3 (2020-12-16 14:17:05)
2021-03-25 10:21:22.547636|INFO    |ServerLibPriv |   |SystemInformation: Linux 4.19.121-linuxkit #1 SMP PREEMPT Thu Jan 21 15:45:22 UTC 2021 x86_64 Binary: 64bit
2021-03-25 10:21:22.552385|INFO    |DatabaseQuery |   |dbPlugin name:    SQLite3 plugin, Version 3, (c)TeamSpeak Systems GmbH
2021-03-25 10:21:22.552755|INFO    |DatabaseQuery |   |dbPlugin version: 3.11.1
2021-03-25 10:21:22.556875|INFO    |DatabaseQuery |   |checking database integrity (may take a while)
2021-03-25 10:21:22.673875|INFO    |ServerLibPriv |   |updated server query admin password
2021-03-25 10:21:22.728071|WARNING |Accounting    |   |Unable to open licensekey.dat, falling back to limited functionality
...

Then just do a ctrl+c to stop the temp container and then start the original container:

docker start teamspeak

@Exist2Resist
Copy link
Author

Thanks I will give that a try.

@Exist2Resist
Copy link
Author

@mbentley there are some issues with persistence when I reset the password.
If I spin up the temp container, I can telnet in and login with the set password to the temp container.
If I spin the container down, and spin up the permanent container, I can not login as server-admin in to said contianer.
Additionally if I use the temp container, reset the password for server-admin, it only works in the temp container.

@mbentley
Copy link
Owner

mbentley commented Mar 25, 2021

Well, if you used my exact command, it isn't going to be mapping to the same data directories as whatever you did which would explain the data persistence issue. Could you show me the commands you used to originally start your container and the commands used in trying to reset the password, removing any password(s)?

@Exist2Resist
Copy link
Author

Yes you are right I was mounting to a backup of my TS3 server.
Fixed now.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants