NullPointerException with LDAP

hl2385 years ago

Hi,

we are running Traccar (very good job, by the way!) together with Teltonika devices for several month now, on version 4.5 currently.
We use mixed basic and LDAP auth (against an Windows 2008 R2 domain controller) successfully since the initial setup.

Since a few days, some users authenticated by LDAP (but not all of them) receive this error message when they try to login:

NullPointerException (… < DataConverter:29 < Hashing:82 < User:273 < …)

Such an account does not get authenticated.

And interestingly in addition, if I replace the SAMaccountName in DB table "tc_users" in column "login" of an affected user with that one of a user who does not get the error message, and I then login with this replaced name, this "hacked" account opens properly without the error message.

What could go wrong here? I'm very sure that neither on the Traccar server itself, nor on the LDAP side (users/groups) anything was changed since logins were working properly a few days ago (apart from regular Windows Updates, maybe). Loglevel is on "INFO" and does not show any login events (only a lot of conversion problems concerning the Teltonika protocol, but these show up ever since we started to use the devices and didn't cause problems so far).

Thanks in advance for any hints
Heiko

hl2385 years ago

Never mind; the error was caused by using wrong passwords due to some misunderstandings on users' side. Seems that this exception is normal when using LDAP auth and trying to login with a correct username but a wrong password.

redofi 5 years ago

hi y'all,

i have the same error but with a correct username password

and i've already imported the ldaps cert to jre key store and root ca

thanks in advance

hl2385 years ago

I saw this error as described (wrong password) and additionally when a user, who is meant to get authenticated using LDAP, was added manually instead of letting Traccar create the user during his/her first log in.
In the second case, the user has to be deleted again, then the user has to log in using his/her LDAP credentials once; if that succeeds, Traccar creates this user in its internal users table. Then the user's configuration eventually has to be finalized in Traccar by the admin (assign permissions to the devices/device groups etc., depends on your environment).