How to manually reset the password of my instance

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

en:How to manually reset the password of my instance <span data-link_translate_fr_title="Comment reset manuellement le mot de passe de mon instance"

Introduction

Sometimes the password reset function may not work when the router vm zone's is overloaded.

It is possible to reset your root password manually via a LiveCD.

Here we will use SystemrescueCD.

Procedure

The first step is to have your instance turned on.

C-reset-1.JPG

1) Click in "Attach ISO"

2) Pick the ISO "GNU/Linux LiveCD SystemRescue"

Then click in "OK"

Ensuite nous allons redémarrer l'instance pour démarrer sur le liveCD.

C-reset-2.JPG

3) Click the "Restart" button.

4) Open the Cloudstack console to monitor the startup.

Note: The password change will be done through the Cloudstack console.



C-reset-3.JPG

The LiveCD will then boot, make the live CD boot via the default boot options:

Note: If the liveCD does not boot, choose "Other 64-bit" at the "OS Type" of the instance.


5) Choose the first option by pressing enter.

Once the OS has loaded all the components, you will then have a :

C-reset-4.JPG

Note: Set the keyboard to French for + ease via the "Keyboard" button at the top.


Here we will have to mount the partition containing the system of your instance in a folder.
You need to identify the volume group and mount the logical volume.
You can identify it in the /dev/ folder, here our volume group is "debian9x64" and the logical volume we are interested in is "root". We will mount this one in /mnt/ :

mount /dev/debian9x64/root /mnt


Then we will put ourselves in the same "environment as our instance" via the command:

chroot /mnt /bin/bash


Then you just need to change the root password:

passwd root


You can now shut down your instance,detach the ISO and restart this one.