Set it to 1 and restart service.
Okay that worked, thanks for the tip to reboot after changing it.
@Xesyl ...can you provide some more details on how you got admin privileges back after upgrading to 4.0? I think I’ll run into the same issue when I update my 3.x to 4.0.
Sure, while this will work for MySQL, I'm not sure how to do it if you're using the flat file DB (sqlite maybe?).
Basically you login to MySQL (mysql -u <username> -p
)
Select the Traccar DB.
use <dbname>;
Find the ID of the user who needs it:
select id from tc_users where email like 'email@address.com';
Update the user to be admin:update tc_users set administrator=(1) where id='<id>'
(the <id> is the number from the previous command). Make sure it's administrator=(1) as this sets the binary bit to 1 it's not an integer so '1' won't work.
Finally stop and restart Traccar and it should be good to go.
Thanks!!! I’m using MySQL as well so will try it when I get to update it.
I upgraded to TracCar 4 running MySQL just now, and all my Admin users, including the default Admin user have lost admin privileges on the server.
I attempted to run the commands:
or
And neither appear to work (it's a bit field so 1 or 0 appear to be the only options).
Is there any other way of recovering admin on the server now?