I am trying to change my neo4j password through the following command line operation, following Brent Barbata's answer on this link
curl -H "Content-Type: application/json" -XPOST -d '{"password":"new_password"}' -u neo4j:neo4j http://localhost:7474/user/neo4j/password
But I am getting the following error
{
"errors" : [ {
"code" : "Neo.ClientError.Security.Unauthorized",
"message" : "Invalid username or password."
} ]
I tried this alternate way following the ideas from this question
curl -H "Content-Type: application/json"\ -H "Authorization: Basic `echo -n 'USERNAME:OLDPASSWORD | base64`"\ -X POST -d '{"password":"NEWPASSWORD"}'\ -I http://localhost:7474/user/neo4j/password
And got the following error
curl: (6) Could not resolve host: Authorization
curl: (6) Could not resolve host: POST
{
"errors" : [ {
"code" : "Neo.ClientError.Security.Unauthorized",
"message" : "No authentication header supplied."
} ]
Whats wrong in these methods and what is the way to change password?
I do not want to use :server change-password
on browser. I am running neo4j 3.3.5 on Ubuntu 16.04