Skip to content

Changing user passwords via pynetbox does not work #694

Description

@ShaneMcC

pynetbox version

v7.5.0

NetBox version

v4.1.0

Python version

3.12

Steps to Reproduce

Using the following code, no change is made and the script just outputs False:

import pynetbox

instance = 'urlgoeshere'
token = 'tokengoeshere'

nb = pynetbox.api(url=f'https://{instance}/', token=token)
existing_user = nb.users.users.get(username='some.user')
user_update_payload = {'password': 'SomeNewPassword1234'}
result = existing_user.update(user_update_payload)
print(result)

Expected Behavior

The user's password should get updated.

Observed Behavior

No change was made to the user.

Enabling debugging for the underlying http library shows that no PATCH request is even attempted.

PATCH manually via curl for the user works as expected (so netbox behaves correctly, pynetbox does not)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app: pynetboxseverity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions