This is obviously super late to the party but I came across the exact same issue (locked out of my own TS server admin group after formatting my PC and no way to find the ServerQuery password). Recreating the entire server configuration and channels was not an option, so I found a solution on my own and thought I'd share it here in case someone needs it later.
a) How to reset the ServerQuery password
From your unraid SSH terminal, enter your running teamspeak container: docker exec -it <teamspeak container ID> bash
Open with a text editor the file ~/start.sh . I use nano as it's available in this container: nano ~/start.sh
Find the "# run teamspeak server" line, it was at the bottom of mine and looked like this:
cd "${install_path}/sql/" && /usr/bin/ts3server logpath=/config/ dbsqlpath=/usr/share/teamspeak3-server/sql/ licensepath=/config/ license_accepted=1
Modify the line by adding "serveradmin_password=YourNewPassword". It should look like this:
cd "${install_path}/sql/" && /usr/bin/ts3server logpath=/config/ dbsqlpath=/usr/share/teamspeak3-server/sql/ licensepath=/config/ license_accepted=1 serveradmin_password=<New serveradmin Password Here>
Save the file, exit the container and restart it from the Unraid Dashboard.
Save your new serveradmin password somewhere safe (e.g. password manager) for future usage, skipping this step.
b) How to create a new privilege key via ServerQuery
Connect to your TS server with a regular client. Go to Permissions > Servergroups. Memorize the number in parentheses behind the server group you want to recover. Usually Server Admin is ID 6.
Connect via telnet to the ServerQuery. I use Kitty but you can use Putty or anything else:
IP: your Unraid Server IP
Port: 10011
Upon connecting, you should see the following text. If not, you probably used the wrong port:
TS3
Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
Type login serveradmin <New serveradmin Password Here> and press Enter. The server should respond error id=0 msg=ok
Type use port=<The port you used to connect using the TS3 Client, usually 9987> and press Enter. The server should respond error id=0 msg=ok
Type privilegekeyadd tokentype=0 tokenid1=<The Number you memorized in step 1> tokenid2=0 and press Enter. The server should respond:
token=YourNewTokenReadyToBeUSed
error id=0 msg=ok
Return to your TS client, Go to Permissions > Use Privilege Key and paste the token in the input box.
Go back to the ~/start.sh file modified in step a) and remove the serveradmin_password=<New serveradmin Password Here> argument as it's not needed anymore. Note that the new serveradmin password will still work, the argument resets it at each restart of the server.
Done. 😉
c) Optional but recommended: remove your old TS credentials
If you completely lost your previous credentials, there's no need to keep them on your server. You can remove them:
Go to Permissions > Server Groups
Select the admin group
On the right side of the window there's a list of all the users in that group. Find your old account and remove it. If the username are similar, you can temporally change your current username and refresh the list to distinguish them.