Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Reset root password on scaleway.com

Source: https://community.online.net/t/reset-root-password-via-console/1724/3

I solved this problem, found a hint here: https://github.com/scaleway/initrd/tree/master/Linux 184.

Here is what I did:

  1. Edit the “Tags” field in the server definition and add “INITRD_POST_SHELL=1” as one (or the only) tag.
  2. Reboot the server
  3. Wait until you get a shell
  4. Run: chroot /newroot
  5. Change your password using passwd passwd root
  6. CTRL-d to resume booting.
  7. Test your new password.
  8. Remove “INITRD_POST_SHELL=1” from your tags
@nodesocket

This comment has been minimized.

Copy link

@nodesocket nodesocket commented Mar 13, 2019

👍 thanks for this guide.

@ttodua

This comment has been minimized.

Copy link

@ttodua ttodua commented Oct 11, 2020

Has anyone got this working?

@ablce9

This comment has been minimized.

Copy link

@ablce9 ablce9 commented Jan 14, 2021

Thanks! Worked like a charm.

@kzkvv

This comment has been minimized.

Copy link

@kzkvv kzkvv commented Jan 31, 2021

It didn't work in my case.

@kzkvv

This comment has been minimized.

Copy link

@kzkvv kzkvv commented Feb 3, 2021

I still managed to do it! What's the problem: I have an old version of ubuntu (16.04 lst xenial), just adding a tag was not enough. What I did before proceeding with the algorithm described above:

  1. open the console and go to the instance settings
  2. advanced settings -> boot mode -> use bootscript -> select "x86_64 longterm 4.14 latest" -> save
  3. after that, proceed to the algorithm described at the very beginning of the discussion: add the tag INITRD_POST_SHELL=1, overview - > console, reboot instance, change the password in the terminal that opens after the system boots, and so on.
@axilleas

This comment has been minimized.

Copy link

@axilleas axilleas commented Mar 18, 2021

Thanks for the tip @kzkvv, worked on an 18.04 server 🚀

@rpoisel

This comment has been minimized.

Copy link

@rpoisel rpoisel commented Sep 3, 2021

Thanks mate! It worked for me. 👍

@alanorth

This comment has been minimized.

Copy link

@alanorth alanorth commented Sep 8, 2021

What is this black magic? Still works... thanks! 🧙‍♂️

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