What is neo4j users used for?

Sorry for this stupid question. But I couldn't get it exactly when we need it to use.

I see that we can have users through dbms.security. But I don't see anywhere about login, logout process for this.

When I start the graph (using graph db user and password) I am able to access the browser and can query without doing anything. I mean I didn't use neo4j as user and admin as password anytime.

Also, I have a curiosity on how can we define relationships on the users. If not, we should create User node and work in them like we do on other nodes?

Hi @ri8ika

Login is the first step when you would start working on it.
when you will open neo4j first time in browser then it would ask for default username and password after that you can change it.
sorry we are not able to understand that what you are trying to do.
could you please explain your scenario ?

How can I logout then?

The next scenario is that something like:

Users can have Posts, Books, etc. and we can define the relationships between users and posts, books, etc. So, can we use the neo4j users or we need to define User node like we do for Post, Book, etc and maintain the application authentication with created node User?

When you open a Neo4j Browser to a started database, you are, by default logged in to the database.

The default user for a Browser session is neo4j. Of course, you can add users to the database if you want different users to access the database with different credentials.

I think what you are looking to do, however is to create nodes and relationships in the database itself to represent users, posts, etc, and their relationships.

I recommend that you take our free online training course to become familiar with how to create nodes and relationships is a graph:



1 Like

or you can not logout from neo4j.
you can delete auth file then it will ask you for login process again.

Sorry for the stupid question. And thanks for the confirmation.