Boone Putney bio photo

Boone Putney

Software Development
Random Musings
Austin, Texas

HumanPlanet Soleer

Email LinkedIn Github

Description

I’m new to the Neo4j world, but I’ve been wanting to work with a graph database, and Neo4j is a good fit for a current project, so I decided to dive in. It seems there have been numerous changes recently to the Neo4j API, and there is a lot of wrong/outdated information out there. The official docs, however, are very useful. Anyways, here’s a quick bit on how to change your password via curl if you make the same mistake I did, and set your password up with certain special characters that can cause issues.

Command to Change Password

1 curl -H "Content-Type: application/json"\
2   -H "Authorization: Basic `echo -n 'USERNAME:OLDPASSWORD' | base64`"\
3   -X POST -d '{"password":"NEWPASSWORD"}'\
4   -I http://localhost:7474/user/neo4j/password

Explanation

The command above creates a base64 encoding of: “USERNAME:OLDPASSWORD”, and adds it to the basic authorization header. We then post json data with the requested new password. If everything goes according to plan, you’ll be greated with an “HTTP/1.1 200 OK” response code.