Bug #21608
closedResetting password via REST fails
Description
When trying to change the admin password via the REST API an error is received:
curl -s -k -X PUT -u admin:$( foreman-rake permissions:reset 2> /dev/null | awk '{print $6}' ) -H "Content-Type:application/json" -H "Accept:application/json" -d '{"login": "admin","current_password":"WR3ZNvbiBh9x7sTS"}' https://slik01.example.com/api/v2/users/1
{
"error": {"message":"Resource user not found by id '1'"}
}
This does not occur in version 1.15 and works without issue on that version. I am also unable to view it directly with my browser. It does not matter if I remove the "/v2/" section from the URL
Updated by Marek Hulán over 6 years ago
- Category changed from API to 218
Could you check what user list returns? On clean installation, admin usually has id 3, 1 and 2 are usually used by hidden internal admin accounts which can't be modified.
Updated by James Shewey over 6 years ago
Marek Hulán wrote:
Could you check what user list returns? On clean installation, admin usually has id 3, 1 and 2 are usually used by hidden internal admin accounts which can't be modified.
This was my fault. This was failing on the old version too, it just didn't report an error. The new version (more correctly) reports an error when the pwd cannot be reset.
Updated by Tomer Brisker almost 4 years ago
- Category changed from 218 to Users, Roles and Permissions