Change the password through the REST interface
Hi, all
I'm trying to change the user's password through the REST interface.
Feedback is "The specified method cannot be found"
The'busctl introspect'command also failed to find this method.
What may be the cause? Is there any other way to change passwords through REST?
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json"
-d "{\"data\": [\"1qaz@WSX\"] }" -X POST
https://${bmc}/xyz/openbmc_project/user/xiao/action/SetPassword
{
"data": {
"description": "The specified method cannot be found"
},
"message": "404 Not Found",
"status": "error"
}Hi,
Which webserver(bmcweb/phosphor-rest-server) you are using it?
If bmcweb then use the redfish API to change the password.
Ratan
Quoted 21 lines · Xiaochao Ma (马小超)
Hi, all
I'm trying to change the user's password through the REST interface.
Feedback is "The specified method cannot be found"
The'busctl introspect'command also failed to find this method.
What may be the cause? Is there any other way to change passwords through REST?
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -d "{\"data\": [\"1qaz@WSX\"] }" -X POST https://${bmc}/xyz/openbmc_project/user/xiao/action/SetPassword { "data": { "description": "The specified method cannot be found" }, "message": "404 Not Found", "status": "error" }