Connect Neo.ClientError.Security.Unauthorized: The client is unauthorized due to authentication failure

hi
I installed recently neo4j browser
I typed "bolt://localhost:7687 as a connect URL", "neo4j" as user and "neo4j" as psw but I faced this error msg " Neo.ClientError.Security.Unauthorized: The client is unauthorized due to authentication failure." what should I do please

what version of Neo4j?
Have you previously connected with username: neo4j. did you change this users password?
For native Neo4j Authentication, users and roles are recorded in data/dbms/auth and data/dbms/roles respectively. If you do not know the neo4j usernames password you can remove data/dbms/auth, restart Neo4j and the default password is neo4j

3 Likes

@dana.canzano,

Upgraded to ver 4 last night. I was stuck on "Neo.ClientError.Security.Unauthorized: The client is unauthorized due to authentication failure." and came across your above reply. Removed auth file and re-start Neo4j no success then removed roles file as will stopped the db, re-started my pc. No if I try with Atuth type User/password with neo4j as user and password I am getting "Neo.ClientError.Security.Unauthorized: The client is unauthorized due to authentication failure." And If try Auth type No Authentication I am getting "Neo.ClientError.Security.Unauthorized: Unsupported authentication token, missing key scheme: { user_agent='neo4j-javascript/0.0.0-dev' }".

I'm not sure if I can resolve this my myself. Need some guidance to proceed.

Thanks.

I ran into the same issue, except this was a clean install.

I used the neo4j-admin set-initial-password before I logged in for the first time.
Password was never accepted.

The only workaround for me was to delete the database, and the auth file, restart the service, and log in using neo4j/neo4j and change password when prompted. Obviously this doesn't help you with an "upgrade" ...

I'm having the same issue after upgrading to 4.0. Is there an alternative solution other than deleting the database?

Hello,

In 4.0 we have a specific password recovery procedure, you can find it in the product documentation.
https://neo4j.com/docs/operations-manual/4.0/configuration/password-and-user-recovery/

Kind regards,

Was able to solve the password issue from Neo4j 4.0 browser, providing the default password requires immediate password change and DB was successfully updated.

$ neo4j-admin set-initial-password <new_pw>

^ weird that this ran successfully, but then could not authenticate in UI. However, the default neo4j pw string did work...