El servidor traccar no me acepta la contraseña admin

ojo vivo7 years ago

Estimado Anton
por favor me puede ayudar con este problema
Mensaje al Logearme como administrador:

account is disabled- SecurityException(permissionsManager:252<*:249<SessionResource:103
Anton Tananaev7 years ago

I don't speak Spanish, if this was addressed to me.

Francisco Martin7 years ago

Hola Ojo Vivo,

tal y como dice el mensaje, el usuario está deshabilitado, debería entrar con algún gestor de base de datos tipo phpmyadmin, y cambiar en ese usuario el atributo "disabled" a valor 0.

Un saludo.

ojo vivo7 years ago

Thanks dear Francisco
I'm using trccar's built-in H2 database
How can I connect to change the "disabled" attribute to value 0?
  can you help me with that?

Francisco Martin7 years ago

Hola Ojo Vivo,

disculpame, no te pregunté que motor de base de datos usabas. Si estás usando linux, puedes hacerlo desde el mismo terminal. Debes tener el servidor parado para poder acceder a la base de datos. Doy por supuesto algunos directorios, si son diferentes, cambialo a los que tengas tú:

root@/opt/traccar # java -cp /opt/traccar/lib/h2-1.4.197.jar org.h2.tools.Shell -url jdbc:h2:/opt/traccar/data/database -user sa

Welcome to H2 Shell 1.4.197 (2018-03-18)
Exit with Ctrl+C
Commands are case insensitive; SQL statements end with ';'
help or ?      Display this help
list           Toggle result list / stack trace mode
maxwidth       Set maximum column width (default is 100)
autocommit     Enable or disable autocommit
history        Show the last 20 statements
quit or exit   Close the connection and exit

sql> select * from users ;
ID | NAME  | EMAIL | HASHEDPASSWORD                                   | SALT                                             | READONLY | ADMINISTRATOR | MAP | LATITUDE | LONGITUDE | ZOOM | TWELVEHOURFORMAT | ATTRIBUTES | COORDINATEFORMAT | DISABLED | EXPIRATIONTIME | DEVICELIMIT | TOKEN | USERLIMIT | DEVICEREADONLY | PHONE | LIMITCOMMANDS | LOGIN | POILAYER
1  | admin | admin | 207320984417e9e314db9273745e0a900f57963ec151a43d | 7cb5c79b44d392f552c563041754159b544329076730c6da | FALSE    | TRUE          |     | 0.0      | 0.0       | 0    | FALSE            | {}         |                  | TRUE     | null           | -1          | null  | 0         | FALSE          |       | FALSE         |       |
(1 row, 44 ms)
sql> update users set disabled=0 where id=1 ;
(Update count: 1, 10 ms)
sql> select * from users ;
ID | NAME  | EMAIL | HASHEDPASSWORD                                   | SALT                                             | READONLY | ADMINISTRATOR | MAP | LATITUDE | LONGITUDE | ZOOM | TWELVEHOURFORMAT | ATTRIBUTES | COORDINATEFORMAT | DISABLED | EXPIRATIONTIME | DEVICELIMIT | TOKEN | USERLIMIT | DEVICEREADONLY | PHONE | LIMITCOMMANDS | LOGIN | POILAYER
1  | admin | admin | 207320984417e9e314db9273745e0a900f57963ec151a43d | 7cb5c79b44d392f552c563041754159b544329076730c6da | FALSE    | TRUE          |     | 0.0      | 0.0       | 0    | FALSE            | {}         |                  | FALSE    | null           | -1          | null  | 0         | FALSE          |       | FALSE         |       |
(1 row, 0 ms)
sql> quit
Connection closed
root@/opt/traccar #

Hecho eso, vuelve a ejecutar el servidor, y ya podrás entrar de nuevo como administrador.

Un saludo.

ojo vivo7 years ago

Gracias estimado me funciona

Francisco Martin7 years ago

Genial :D

ojo vivo7 years ago

Hello Fransisco

in windowa how can I make the change
  the "disabled" attribute to the value = 0?

I tell you to use the console h2 but I can not find the table users

Will there be another way that can give a solution?

dw4 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

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

No puedo entrar a mi usuario no me acepta la contraseña

Maria tellez3 years ago

Qiero entrar no me deja entrar tampco me deja cambiar la clave

Ruben2 years ago

I lost my password too. Can somebody point me out how to fix this?

Anton Tananaev2 years ago

You can set web.serviceAccountToken in the config file and login with it.

Ruben2 years ago

Hi Anton.

Added

<entry key='web.serviceAccountToken'>true</entry>

and restart apache but stil can't acces

Anton Tananaev2 years ago

How are you trying to access it and what's the error?