Closed Exist2Resist closed 3 years ago
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
Thanks I will give that a try.
@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.
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)?
Yes you are right I was mounting to a backup of my TS3 server. Fixed now.
Thanks
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 withserveradmin_password=test1234
wheretest1234
is the value inside the.admin_reset
file.