Ticket #759 (closed Defect: fixed)
change password from curl
Reported by: | JuergeN | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.5 |
Component: | DeepaMehta Standard Distribution | Version: | 4.5 |
Keywords: | Cc: | ||
Complexity: | 3 | Area: | |
Module: |
Description
For the demo server (nightly!) I used to change the admin's password with the following command:
curl -sX POST -H 'Content-Type: application/json' -H 'Authorization: Basic YWRtaW46' -d '{ type_uri: "dm4.accesscontrol.user_account", composite: { dm4.accesscontrol.username: "admin", dm4.accesscontrol.password: "-SHA256-new-password-here" } }' http://localhost:8083/core/topic
In 4.5 this does not work anymore. Could you please provide me the right command. Thx!
Change History
comment:2 in reply to: ↑ 1 Changed 10 years ago by jri
Replying to jri:
Here 1234 is the ID of the User Account topic whose password you want to change.
Note: the ID of the "admin" user account is different for each DM installation.
Tell me if you need find out the ID of the "admin" user account via curl.
Note: See
TracTickets for help on using
tickets.
To change the password of an existing User Account (this works in 4.4 as well):
Here 1234 is the ID of the User Account topic whose password you want to change.
Note: the ID of the "admin" user account is different for each DM installation.
---
Hints:
the curl command you mention in the ticket description does not change the password of an existing user account but creates a new one. The command is valid for DM 4.3, however it would render the "admin" account unusable as there are 2 "admin" users now.
Generally: since DM 4.4 the composite wording is obsolete in a request. It must be replaced by childs (see #702 and ticket:757#comment:3).
In DM 4.4 the curl command would create an User Account topic but without username and password child topics (as the composite part is ignored). That account would not be functional.
In DM 4.5 to create an user account see ticket:757#comment:5.
I doubt the curl command you mentioned has ever worked to change the password of an existing user account. You would need the topic ID of that user account for sure.
For diagnose purpose you can add -i to the curl command to see the response status and response headers.