Forgot Neo4j Server Password

NumenorForLife picture NumenorForLife · Jun 2, 2015 · Viewed 36.6k times · Source

Because this question was never answered, I was hoping someone could help me reset the password to connect to my neo4j password (at localhost:7474). Zachary wrote a post on solving this by someone restarting the service using:

sudo service neo4j-service restart

but I did not find this helpful. In the terminal, I ran bin/neo4j restart (which I think is the equivalent command), and was not able to reset my password.

Answer

ErnestoE picture ErnestoE · Jun 4, 2015

Depending on environment and installation type you need to look for a file named auth under directory dbms and remove it.

In MacOs, for dmg installations (adjust for custom locations):

/Users/xyz/Documents/Neo4j/default.graphdb/dbms/auth

or (homebrew install)

/usr/local/Cellar/neo4j/x.x.x/libexec/data/dbms/auth

Windows users should look for same file in the default.graphdb/dbms directory.

In Ubuntu

/var/lib/neo4j/data/dbms/auth

In docker containers

/var/lib/neo4j/data/dbms/auth

Alternatively, you might choose to disable auth in the configuration file, usually found in

MacOs:

/Users/xyz/Documents/Neo4j/.neo4j.conf

or

/usr/local/Cellar/neo4j/x.x.x/libexec/conf

and set this property to false

dbms.security.auth_enabled=false

After doing this, you need to restart the server for changes to make effect, you will be asked for a new password.