1

Is there any way to add neo4j admin user from console? I found how to change default password for native user neo4j https://neo4j.com/docs/operations-manual/current/configuration/set-initial-password/ but didn't found how to add new admin user.

kali
  • 115
  • 1
  • 2
  • 9

2 Answers2

3

It's not possible with the neo4j-admin tool, but directly with the cypher-shell by running those queries (so you need to have a running database):

CALL dbms.security.createUser('root', 'password');
CALL dbms.security.addRoleToUser('admin', 'root');

You will find the description of all security's procedures here : https://neo4j.com/docs/operations-manual/current/security/authentication-authorization/native-user-role-management/procedures/

logisima
  • 7,340
  • 1
  • 18
  • 31
0

Since it was needed to set credentials before neo4j start I manually generated login and password using script from this comment and inserted them to neo4j auth file.

kali
  • 115
  • 1
  • 2
  • 9