Set an initial password

Use the set-initial-password command of neo4j-admin to define the password for the native user neo4j. This must be performed before starting up the database for the first time.

Syntax:

neo4j-admin dbms set-initial-password <password> [--require-password-change]

Example 1. Use the set-initial-password command of neo4j-admin

Set the password for the native neo4j user to 'h6u4%kr' before starting the database for the first time.

$neo4j-home> bin/neo4j-admin dbms set-initial-password h6u4%kr
Example 2. Use the set-initial-password command of neo4j-admin with the optional --require-password-change flag

Set the password for the native neo4j user to 'secret' before starting the database for the first time. You will be prompted to change this password to one of your own choice at first login.

$neo4j-home> bin/neo4j-admin dbms set-initial-password secret --require-password-change

If the password is not set explicitly using this method, it will be set to the default password neo4j. In that case, you will be prompted to change the default password at first login.