Project

General

Profile

Actions

Bug #21608

closed

Resetting password via REST fails

Added by James Shewey over 6 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

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

Actions #1

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.

Actions #2

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.

Actions #3

Updated by James Shewey over 6 years ago

  • Status changed from New to Rejected
Actions #4

Updated by Tomer Brisker almost 4 years ago

  • Category changed from 218 to Users, Roles and Permissions
Actions

Also available in: Atom PDF