---
title: How to change the root password
description: This page explains how to change the root password on a Scaleway Dedibox server
tags: root-password root password dedibox
dates:
  validation: 2025-09-03
  posted: 2021-06-11
---
import Requirements from '@macros/iam/requirements.mdx'


This document shows you how to change your password using the [rescue system](/dedibox/how-to/use-rescue-mode/). If you try to use the usual `passwd` command to change your password, it will only change the password of the rescue system. Your modifications are reset after a reboot. We will show you how to access your real files to change your password.

<Requirements />

- A Dedibox account logged into the [console](https://console.online.net)
- [Created](/dedibox/how-to/order-a-server) and [installed](/dedibox/how-to/install-a-server/) a dedicated server

1. From the console, [launch rescue mode](/dedibox/how-to/use-rescue-mode/).
2. Mount your partitions:
    ```
    sudo mountall.sh
    ```

    <Message type="note">
      The mounted partitions are available in the directory `/mnt`. This means, you find the partition `/dev/sda1` mounted in `/mnt/sda1`.
    </Message>
3. Chroot into the root partition:
    ```
    sudo chroot /mnt/sda2
    ```

    <Message type="note">
      - If you [installed your server](/dedibox/how-to/install-a-server/) with the default partition layout, the root partition will be mounted on sda2.
      - If you configured custom partitioning, your root partition may be mounted elsewhere.
    </Message>
4. Use the following command to change the password:
    ```
    passwd
    ```
    You will be prompted two times to set the new password. While you are writing, nothing will appear on screen. This is a normal security measure.

    <Message type="tip">
      If you want to reset the password of a user other than root, use the following command, replacing **USERNAME** with the relevant username.
      `passwd USERNAME`
    </Message>
5. Type `exit` when you have finished your modifications.
6. Type the following command to finish:
    ```
    sudo umountall.sh && sudo reboot
    ```
7. From the console, click **Boot in normal mode** to reboot the server.

    Your root password is now changed.


