cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Several passwords issues

Hey ! newbie here. Thx for stoping by

I got several issues with the passeword :
I've read here and there, we just have to enter neo4j/neo4j at the beginning, delete a files into dbms or change something into conf
But, first it has never asked for the login/passeword at the beginning (just to create a password when we create a new database). And for the other stuff, didn't change anything

So :

  • If i change the passeword of the database i got a window "passeword have been changed"
    and neither the first password nor the new one works

  • And second, impossible to connect to the database with python.
    I always got something :
    -if it's not, "AuthError: The client is unauthorized due to authentication failure".
    -It's "FileNotFoundError: [Errno 2] No such file or directory"
    -or i don't even know what anymore, i had several errors

here's the code :
I get some data from an excel files. And i gonna make my request into the loop to create all the nodes / relationships i need.
(just put a print so far, didn't worked on the query yet, since i can't connect to the database)

import pandas as pd
from neo4j import GraphDatabase
from py2neo import Graph, Node, Relationship

uri = "bolt://localhost:7687"
driver = GraphDatabase.driver(uri, auth=("neo4j", "neo4j"))

def initialisation_base_de_donnees():
    
    xl = pd.ExcelFile("initialisation_base.xlsx")    
    df = {}
    
    for sheet in xl.sheet_names:
        df[f'{sheet}'] = pd.read_excel(xl, sheet_name = sheet)
             
    graph = Graph()
    tx = graph.begin()
    for pere, connaissances, rang in zip(df["connaissances"]["nom"], 
                                         df["connaissances"]["pere"],
                                         df["connaissances"]["rang"]):

        print(pere, connaissances, rang)

thx for reading

PS : I have also read "you must change the password for the neo4j user" but how you do that ?
4.0.3 for the version.

1 ACCEPTED SOLUTION

Hi Mathieu ,

You can reset your password for user 'neo4j' (assuming your admin user is neo4j )
by following below steps:

1.Stop Neo4j:

$ bin/neo4j stop

2.Modify Neo4j.conf file and change dbms.security.auth_enabled=true to dbms.security.auth_enabled=false

3.Start Neo4j

$ bin/neo4j start

  1. Connect to the system database via Cypher Shell, and modify the admin user password:

$ bin/cypher-shell -d system

neo4j@system> ALTER USER neo4j SET PASSWORD 'PutYourNewPasswordHere';

neo4j@system> :exit

or

You can also change password from Neo4j Browser using below command:

ALTER USER neo4j SET PASSWORD 'PutYourNewPasswordHere';

  1. Stop neo4j:

$ bin/neo4j stop

  1. change the neo4j.conf file:

#dbms.security.auth_enabled=false (Comment the existing line)

or,

dbms.security.auth_enabled=true (set this option to True)

  1. Restart Neo4j:

$ bin/neo4j start

Hope this helps in resetting your password.

View solution in original post

2 REPLIES 2

Hi Mathieu ,

You can reset your password for user 'neo4j' (assuming your admin user is neo4j )
by following below steps:

1.Stop Neo4j:

$ bin/neo4j stop

2.Modify Neo4j.conf file and change dbms.security.auth_enabled=true to dbms.security.auth_enabled=false

3.Start Neo4j

$ bin/neo4j start

  1. Connect to the system database via Cypher Shell, and modify the admin user password:

$ bin/cypher-shell -d system

neo4j@system> ALTER USER neo4j SET PASSWORD 'PutYourNewPasswordHere';

neo4j@system> :exit

or

You can also change password from Neo4j Browser using below command:

ALTER USER neo4j SET PASSWORD 'PutYourNewPasswordHere';

  1. Stop neo4j:

$ bin/neo4j stop

  1. change the neo4j.conf file:

#dbms.security.auth_enabled=false (Comment the existing line)

or,

dbms.security.auth_enabled=true (set this option to True)

  1. Restart Neo4j:

$ bin/neo4j start

Hope this helps in resetting your password.

Thanks for your help