You are not logged in.
Pages: 1
Hello Guys,
I tried to change user's password like this :
http://xxx/glpi/apirest.php/user/$user_id
using PUT
{"input" :{"password":"$new password"
}}
and the response :
[
{
"$user_id": true,
"message": ""
}
]
and the new password is encrypted to sha1 but no changes are made. How should I do it guys ??
appreciate any help!
Last edited by aziz (2021-12-16 18:10:51)
Offline
Hey.
I solved the same problem by sending the password unencrypted and setting a second password field (maybe password confirmation?):
curl --location --request PUT 'https://url/apirest.php/User/16/' \
--header 'Session-Token: token' \
--header 'App-Token: token' \
--header 'Content-Type: application/json' \
--data '{
"input": {
"password": "teste123",
"password2": "teste123"
}
}'
Offline
Pages: 1