Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-22-2018 07:27 PM
When using $NEO4J_HOME/bin/cypher-shell
at the command line and authentication is enabled via the setting $NEO4J_HOME/conf/neo4j.conf
:
# Whether requests to Neo4j are authenticated.
# To disable authentication, uncomment this line
dbms.security.auth_enabled=true
a username and password can be provided on the command line using the parameters -u <username> -p <password>
. However, one can
also define environment variables NEO4J_USERNAME
and NEO4J_PASSWORD
, for example:
export NEO4J_USERNAME='neo4j'
export NEO4J_PASSWORD='password'
Once the environment variables are defined one can now run $NEO4J_HOME/bin/cypher-shell
and not specify the -u and -p
on the command line. This has the added benefit that when running the linux 'history' command, which shows the last N command line
invocations, the username and password will not be exposed.
Further if using linux, the export commands above could be placed in the user's home directory in their .bashrc
file (for example
/home/neo4j/.bashrc) and for which the .bashrc
is invoked upon initial login.
If using Windows, environment variables can be defined via Control Panel -> System, Advanced tab, [Environment Variables] as
pictured below:
12-02-2018 10:58 AM
I've posted a powershell method to store/retrieve neo4j credentials in the windows registry
All the sessions of the conference are now available online