James Newton
James Newton

Reputation: 7092

Neo4J: command failed: initial password was not set because live Neo4j-users were detected

On Ubuntu 16.04.3 desktop, I've just uninstalled and reinstalled Neo4j. I haven't started it yet. But when I try to set the initial password ...

sudo neo4j-admin set-initial-password 1234

... I get this output:

command failed: initial password was not set because live Neo4j-users were detected.

How can that be? What can I do to set the initial password?

Upvotes: 9

Views: 6671

Answers (2)

Vishrant
Vishrant

Reputation: 16668

I switched from Neo4J version 3.3.2 to 3.2.1 and then executed following command to change my password:

curl -H "Content-Type: application/json" -X POST -d '{"password":"WHATEVER THE PASSWORD IS"}' -u neo4j:neo4j http://localhost:7474/user/neo4j/password

Ref

Upvotes: 5

Lavande
Lavande

Reputation: 894

Delete the data/dbms/auth file if it exists; then restart the db.

In Ubuntu, the dir would be /var/lib/neo4j/data/dbms/

You can also check file locations from here: https://neo4j.com/docs/operations-manual/current/configuration/file-locations/

Hope it helps.

Upvotes: 19

Related Questions