Neo4j 4.1.1 change password using Rest API

Hello,

i'm trying to use this API to reset password of a user on Neo4j 4.1.1 but i receive 404:

curl -v -H "Content-Type: application/json" -X POST -d '{"password":"Accenture.1"}' -u neo4j:neo4j http://localhost:7474/user/neo4j/password

  • About to connect() to localhost port 7474 (#0)
  • Trying 127.0.0.1...
  • Connected to localhost (127.0.0.1) port 7474 (#0)
  • Server auth using Basic with user 'neo4j'

POST /user/neo4j HTTP/1.1
Authorization: Basic bmVvNGo6bmVvNGo=
User-Agent: curl/7.29.0
Host: localhost:7474
Accept: /
Content-Type: application/json
Content-Length: 26

  • upload completely sent off: 26 out of 26 bytes
    < HTTP/1.1 404 Not Found
    < Access-Control-Allow-Origin: *
    < Cache-Control: must-revalidate,no-cache,no-store
    < Content-Type: text/html;charset=iso-8859-1
    < Content-Length: 0
    <

Can anyone help me?

Thanks,

Alessio

This may be a bit late, but though to post a solution that worked for me. The change password statement needs to be run against the system db. So the url in curl would be http://localhost:7474/db/system/tx instead of http://localhost:7474/db/neo4j/tx
curl -v -H "Content-Type: application/json" -X POST -d '{ "statements" : [ { "statement" : "ALTER CURRENT USER SET PASSWORD FROM 'neo4j' TO 'test.1'" } ]}' -u neo4j:neo4j http://localhost:7474/db/system/tx

This worked perfectly for me