Forum

Results 1 to 5 of 5
  1. #1
    Join Date
    January 2019
    Posts
    3

    Serveradmin account has no permissions

    Edit by mod
    Moved topic out of server 3.6.x release thread.
    Problem is not related to the server release.


    Hey,

    I've been running my TS3 server for personal use with a few separate virtual servers pretty much right as the TS3 beta started.
    Before that I was using TS2.

    The current TS3 setup had been initialized with the default sqlite db, migrated to a mysqldb somewhere in the past but when the db-upgrades between versions became too cumbersome I migrated back to the sqlite db which will be auto-migrated by the TS3 server binary upon start.

    It seems that somewhere along that sqlite->mysql->sqlite route something went wrong and my "serveradmin" query login has pretty much no permissions to do anything useful.

    Currently I'm running TS3 3.6.0 64-bit (updated earlier today) on 64-bit Linux, and this is what it looks like in a telnet query session:

    Code:
    Connected to 127.0.0.1.
    Escape character is '^]'.
    TS3
    Welcome to the TeamSpeak 3 ServerQuery interface, type "help" for a list of commands and "help <command>" for information on a specific command.
    
    login serveradmin <password>
    error id=0 msg=ok
    
    whoami
    virtualserver_status=unknown virtualserver_unique_identifier virtualserver_port=0 virtualserver_id=0 client_id=0 client_channel_id=0 client_nickname client_database_id=1 client_login_name=serveradmin client_unique_identifier=serveradmin client_origin_server_id=0
    error id=0 msg=ok
    
    queryloginlist
    error id=2568 msg=insufficient\sclient\spermissions failed_permid=16
    
    serverlist
    error id=2568 msg=insufficient\sclient\spermissions failed_permid=3
    
    use 1
    error id=0 msg=ok
    
    whoami
    virtualserver_status=online virtualserver_id=1 virtualserver_unique_identifier=<shouldn't matter here> virtualserver_port=9987 client_id=2 client_channel_id=1 client_nickname=serveradmin\sfrom\s127.0.0.1:57360 client_database_id=1 client_login_name=serveradmin client_unique_identifier=serveradmin client_origin_server_id=0
    error id=0 msg=ok
    
    privilegekeylist
    error id=2568 msg=insufficient\sclient\spermissions failed_permid=38
    I have been digging through the forums, google, stackoverflow and also fiddled around in the sqlite database myself but I haven't managed to solve my issue yet.
    The initial reason was to generate a fresh admin token for one of the virtualservers, which I ended up doing manually in the sqlite db because the serveradmin query login wouldn't let me.

    Almost everywhere it says "your db is corrupt, start with a fresh db" and I'm very well aware that my db might be corrupted or not properly migrated (I recall some sort of major permission system overhaul), but I'm hesitant to do that.

    I would welcome any suggestions, somewhere going in the direction of "intialize a fresh sqlite db and then do ??? to migrate your virtualservers/users/settings from the corrupt into the new db".
    The interesting part being ??? which is precisely what I'm looking for here.

    Any help would be much appreciated and I'm not afraid to get my hands dirty, just looking for some guidance here.
    Last edited by dante696; January 31st, 2019 at 09:14 AM. Reason: merged

  2. #2
    Join Date
    June 2008
    Posts
    17,612
    A backup of the database would be the best way to solve this since there is no supported way to fix a database.

    But also important is to find out what went wrong here. Permission ID's have changed and it could be that something went wrong here.
    Did you overwrite all files before you started the server? A missing SQL file could cause such problems.

    Can you send me this database in a private message so that i / we can investigate into this?
    Possibly we can fix it (no promise).

    I moved your post into this thread, because the release was just today.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  3. #3
    Join Date
    January 2019
    Posts
    3
    Quote Originally Posted by dante696 View Post
    A backup of the database would be the best way to solve this since there is no supported way to fix a database.

    But also important is to find out what went wrong here. Permission ID's have changed and it could be that something went wrong here.
    Did you overwrite all files before you started the server? A missing SQL file could cause such problems.

    Can you send me this database in a private message so that i / we can investigate into this?
    Possibly we can fix it (no promise).

    I moved your post into this thread, because the release was just today.
    Hey, thanks for the reply.
    The issue with "restoring the db from a backup" is: The timeframe between the initial sqlitedb -> mysqldb -> sqlitedb again is about 12 months. Because after switching to mysql and then back to sqlite everything seemed fine, but I failed to check the serveradmin/query stuff and did not notice any issues there.
    This means, that there were lots of changes to virtualservers/channels/users inside the db so restoring from a backup of the initial sqlite db (which might have proper integrity and serveradmin permissions) is not really a feasable solution to my issue.

    I'm not hesitant to get my hands dirty and take a deep dive into the database to fix it myself, however I would need some sort of proper documentation of the database structure and layout because reverse-engineering this from a corrupt database is likely not helpful.

    @dante696: I have sent you a PM with my current sqlite db.

    I've noticed that 3.6.1 just went out but from the changelog I assume that it shouldn't have any effect on the issues I'm experiencing.


    EDIT:
    My upgrade process between versions is the following:

    • download new version tarball
    • extract tarball
    • rename extracted tarball directory to include version number, e.g.:
      Code:
      # tar -xf teamspeak3-server_linux_amd64-3.6.0.tar.bz2
      # mv teamspeak3-server_linux_amd64 ts3_srv_3.6.0
    • stop ts3
    • copy over files from the current version to the new version folder like this:
      Code:
      cp -avx "${src}"/{licensekey.dat,serverkey.dat,ts3db_mysql.ini,ts3server.ini,ts3server.sqlitedb,query_ip_blacklist.txt,query_ip_whitelist.txt,files} "${dst}/"
    • start ts3 from the new directory


    This procedure should make sure that I'm using all updated content of the new version (libraries, binaries, helpers, etc.).
    Last edited by foxxx0; January 30th, 2019 at 01:14 PM. Reason: add explanation of update procedure

  4. #4
    Join Date
    June 2008
    Posts
    17,612
    I still don't know why this happened to you but i could see why your serveradmin account is broken.
    It was set in server group 3 which is a template and in group 1 which is the Query guest group.
    He only should be in server group 2 which is the Query Admin group.

    I fixed it for you and will send you a pm with a link for the database.
    Edit
    No guarantee from me that database isn't broken completely! You better have a backup of the database before it did break.
    Last edited by dante696; January 30th, 2019 at 02:01 PM.
    When sending me private messages: Please make sure to include reference link to your forum thread or post.

    TeamSpeak FAQ || What should i report, when i open a client thread?

  5. #5
    Join Date
    January 2019
    Posts
    3
    Quote Originally Posted by dante696 View Post
    I still don't know why this happened to you but i could see why your serveradmin account is broken.
    It was set in server group 3 which is a template and in group 1 which is the Query guest group.
    He only should be in server group 2 which is the Query Admin group.

    I fixed it for you and will send you a pm with a link for the database.
    Edit
    No guarantee from me that database isn't broken completely! You better have a backup of the database before it did break.
    Thank you!
    My "serveradmin" query login is now working properly again without permission issues.

    I highly suspect that I managed to derp that up myself somewhere in the past while fiddling around with the database and giving a normal user also serveradmin-privileges for query login stuff.
    I have since reverted those changes but I seem to have forgotten about how the serveradmin groups should look like.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [Not possible] How to add a new ServerQuery account with certain permissions?
    By chris100184 in forum Server Support
    Replies: 1
    Last Post: February 9th, 2016, 01:27 PM
  2. How to reset serveradmin account?
    By ArrMeeR in forum Permission System
    Replies: 2
    Last Post: January 9th, 2016, 11:07 AM
  3. serveradmin no permissions
    By slushpuppy in forum Permission System
    Replies: 1
    Last Post: July 7th, 2014, 09:49 AM
  4. serveradmin permissions problem
    By dusantomic in forum Permission System
    Replies: 1
    Last Post: November 28th, 2012, 09:43 AM
  5. [Solved] Serveradmin-Account (ServerQuery)
    By Conreason in forum Permission System
    Replies: 2
    Last Post: February 8th, 2010, 05:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •