# user.set_password

Set the password of the specified `username` to the `new_password` specified in payload.

A JSON-RPC `error` response (code `-32602`, Invalid params) is returned in the following situations:

- the user does not exist

- the account is not local to the NAS (Active Directory, LDAP, etc.)

- the account has password authentication disabled

- the account is locked

Note

When the authenticated session has less than the `FULL_ADMIN` role, password changes will be rejected if the payload does not match the currently-authenticated user. Users authenticated with a one-time password are exempt and may change the password without submitting it a second time.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: set_password_data

#### set_password_data

Type: object

UserSetPasswordArgs parameters.

No Additional Properties

##

#### Username

Type: string

Username of the account to change password for.

##

#### Old Password

Default: ""

Current password for verification. `null` if changing password as administrator.

## Any of

Type: string
Type: null

##

#### New Password

Type: string

New password to set for the user account.

Must be at least `1` characters long

##

#### Result

Type: null

Returns `null` on successful password change.

Required roles: