# Resetting a desktop user password

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder containing your desktop.
  1. Navigate to **Cloud Desktop**.
  1. In the left-hand panel, select ![image](../../../_assets/console-icons/display.svg) **Desktops**.
  1. Select the desktop to connect to.
  1. Under **Desktop user**, next to the user account, click ![image](../../../_assets/console-icons/ellipsis.svg) and select **Reset password**.
  1. Confirm the password reset.
  1. Save the new password from the pop-up window that appears, then close the window.

- User desktop showcase {#desktop-showcase}

  1. Open the [User desktop showcase](https://console.yandex.cloud/showcase/cloud-desktop).
  1. If the desktop you want to connect to has the `Stopped` status, run it by clicking ![image](../../../_assets/console-icons/play.svg) and then confirming the action.
  
      Wait for the desktop status to change to `Active`.
  
  1. Click ![image](../../../_assets/console-icons/lock-open.svg) and confirm the password reset.
  1. Save the new password from the pop-up window that appears, then close the window.

- Yandex Cloud CLI {#cli}

  If you do not have the Yandex Cloud CLI yet, [install and initialize it](../../../cli/quickstart.md#install).

  The folder used by default is the one specified when [creating](../../../cli/operations/profile/profile-create.md) the CLI profile. To change the default folder, use the `yc config set folder-id <folder_ID>` command. You can also specify a different folder for any command using `--folder-name` or `--folder-id`. If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. See the description of the [CLI](../../../cli/index.md) command for resetting a [desktop](../../concepts/desktops-and-groups.md) password:

      ```bash
      yc desktops desktop reset-password --help
      ```

  1. Get a list of desktops in the default folder:

      ```bash
      yc desktops desktop list
      ```

      Result:

      ```bash
      +----------------------+------------------+--------+----------------------+---------------------+
      |          ID          |       NAME       | STATUS |   DESKTOP GROUP ID   |   CREATED (UTC-0)   |
      +----------------------+------------------+--------+----------------------+---------------------+
      | e3vmvhgbgac4******** | my-cloud-desktop | ACTIVE | e3v1rbln45tl******** | 2024-10-09 22:42:28 |
      | e3vio1bc5ppz******** | reserved-desktop | ACTIVE | e3v1rbln45tl******** | 2024-10-09 21:35:17 |
      +----------------------+------------------+--------+----------------------+---------------------+
      ```

  1. Select the `ID` of the desktop you need.
  1. Reset the desktop password:
     
     ```bash
     yc desktops desktop reset-password \
       --id <desktop_ID> \
       --user-account-id <user_ID>
     ```
     
     Where:
     
     * `--id`: Desktop ID.
     * `--user-account-id`: Desktop user ID.

- API {#api}

  Use the [resetPassword](../../api-ref/Desktop/resetPassword.md) REST API method for the [Desktop](../../api-ref/Desktop/index.md) resource or the [DesktopService/ResetPassword](../../api-ref/grpc/Desktop/resetPassword.md) gRPC API call.

{% endlist %}