NavigationContentFooter
Suggest an edit

How to change the root password

Reviewed on 12 February 2024Published on 11 June 2021

This document shows you how to change your password using the rescue system. 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
  • You have an account and are logged into the Dedibox console
  • You have created and installed a dedicated server
  1. From the console, launch rescue mode.

  2. Mount your partitions:

    sudo mountall.sh
    Note

    The mounted partitions are available in the directory /mnt. This means, you find the partition /dev/sda1 mounted in /mnt/sda1.

  3. Chroot yourself into the root partition:

    sudo chroot /mnt/sda2
    Note
    • If you installed your 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.
  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.

    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

  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.

See also
How to get started with your serverHow to manage packages
Cloud Products & Resources
  • Scaleway Console
  • Compute
  • Storage
  • Network
  • IoT
  • AI
Dedicated Products & Resources
  • Dedibox Console
  • Dedibox Servers
  • Network
  • Web Hosting
Scaleway
  • Scaleway.com
  • Blog
  • Careers
  • Scaleway Learning
Follow us
FacebookTwitterSlackInstagramLinkedin
ContractsLegal NoticePrivacy PolicyCookie PolicyDocumentation license
© 1999-2024 – Scaleway SAS