Admin Reset Password - Debian ssh

dw3 years ago

Please I need help, in my admin account (traccar 4.0) I can't access, I need to change the password in the database but I don't know how to do it, I have debian and ssh access. I already did the previous steps but I can't (https://www.traccar.org/forums/topic/el-servidor-traccar-no-me-acepta-la-contrasena-admin/#post-62803)

Error: org.h2.jdbc.JdbcSQLException: Table "USERS" not found; SQL statement:
Anton Tananaev3 years ago

The table name has changed from users to tc_users.

dw3 years ago

I apologize for putting it several times, I wasn't sure where it would be better. Thanks for the answer, I already did the steps and it gives me this result:

1 | ADMIN | admin | 1222591d613fbfbc03ca62e3766bf40dbd964cf8cb0a5765 | f6775fcaa25471f094c6aaa1b2377183dce3a2f3ad35b993 | FALSE | TRUE | custom | 0.0 | 0.0 | 0 | TRUE | {"speedUnit": "kmh", "web.selectZoom": 18} | dd | FALSE | 2021-01-01 01:00:00 | -1 | null | 0 | FALSE | | FALSE | |
(data is partially truncated)
(32 rows, 4 ms)
sql> quit

What is the password to enter as admin?

Slawek3 years ago

you can try to reset password to default, next login as admin pass admin and then set new password.

UPDATE tc_users SET email = 'admin', hashedpassword = 'D33DCA55ABD4CC5BC76F2BC0B4E603FE2C6F61F4C1EF2D47', salt = '000000000000000000000000000000000000000000000000' WHERE id = 1;
dw3 years ago

Thanks for the help. I have 2 files in opt / traccar / lib (h2-1.4.197.jar) and (h2-1.4.199.jar), in the 2 I made the change but I still cannot enter with user: admin pass: admin

Looking at the tc_users table I see that the admin user expires on 1/1/2021, could that be? and how can i change it? Thanks for the help.

Slawek3 years ago
UPDATE tc_users SET expirationtime = null WHERE id = 1;

after

sudo systemctl restart traccar.service

dw3 years ago

Thanks now it works !!!, I made the change in /opt/traccar/lib/h2-1.4.197.jar and it worked correctly, thanks for the time and the excellent support !!