But I still get "Invalid username or password."" on curl -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -X POST -u neo4j:newpass1 http://localhost:7474/db/data/cypher -d '{ > "query" : "CREATE (n:Person { name : {name} }) RETURN n", > "params" : { > "name" : "Foo" > } > }' { "errors" : [ { "code" : "Neo.ClientError.Security.Unauthorized", "message" : "Invalid username or password." } ] }
Steps performed: 1. sudo rm /var/lib/neo4j/data/dbms/auth 2. sudo neo4j-admin set-initial-password newpass1 3. curl for auth curl -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -X GET -u neo4j:newpass1 http://localhost:7474/ { "management" : "http://localhost:7474/db/manage/", "data" : "http://localhost:7474/db/data/", "bolt" : "bolt://localhost:7687" } 4. Create a new node curl -H "Accept: application/json; charset=UTF-8" -H "Content-Type: application/json" -X POST -u neo4j:newpass1 http://localhost:7474/db/data/cypher -d '{ > "query" : "CREATE (n:Person { name : {name} }) RETURN n", > "params" : { > "name" : "Foo" > } > }' { "errors" : [ { "code" : "Neo.ClientError.Security.Unauthorized", "message" : "Invalid username or password." } ] } Did i miss something? On Wednesday, June 21, 2017 at 6:52:38 AM UTC+1, Michael Hunger wrote: > > You can remove data/dbms/auth and try neo4j-admin again > > And then provide -u neo4j:password to curl for auth > > Von meinem iPhone gesendet > > Am 21.06.2017 um 00:02 schrieb [email protected] <javascript:>: > > I'm trying to setup neo4j on ubuntu virtual server but having issues > connecting. > > curl -H "Accept: application/json; charset=UTF-8" -H "Content-Type: > application/json" -X POST http://localhost:7474/db/data/cypher -d '{ > > "query" : "CREATE (n:Person { name : {name} }) RETURN n", > > "params" : { > > "name" : "Foo" > > } > > }' > { > "errors" : [ { > "code" : "Neo.ClientError.Security.Unauthorized", > "message" : "No authentication header supplied." > } ] > } > > > > if i try to change password with 'neo4j-admin set-initial-password' > i get : command failed: initial password was not set because live > Neo4j-users were detected. > > when i try to change the password with a rest call: > > curl -H "Accept: application/json; charset=UTF-8" -H "Content-Type: > application/json" -X POST http://localhost:7474/user/neo4j/newpass12 > { > "errors" : [ { > "code" : "Neo.ClientError.Security.Unauthorized", > "message" : "No authentication header supplied." > } ] > } > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > For more options, visit https://groups.google.com/d/optout. > > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
