Difference between revisions of "How to change root password"

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽
Line 50: Line 50:
  
 
* We first create the destination folder :
 
* We first create the destination folder :
     <span style="color: #ffffff; background-color: #000000;"> # mkdir /mnt/disk</span>
+
     <span style="color: #ffffff; background-color: #000000;"> # mkdir /mnt</span>
  
 
* Then we go up the system in this folder :
 
* Then we go up the system in this folder :
     <span style="color: #ffffff; background-color: #000000;"> # mount /dev/sda3 /mnt/disk</span>
+
     <span style="color: #ffffff; background-color: #000000;"> # mount /dev/sda3 /mnt</span>
  
 
If you have a RAID system, the command is :
 
If you have a RAID system, the command is :
  
     <span style="color: #ffffff; background-color: #000000;"> # mount /dev/md1 /mnt/disk</span>
+
     <span style="color: #ffffff; background-color: #000000;"> # mount /dev/md1 /mnt</span>
  
 
* Once you have mounted the partitions you must perform a 'root change ' (chroot) in order to simulate being on your system, via the command :
 
* Once you have mounted the partitions you must perform a 'root change ' (chroot) in order to simulate being on your system, via the command :
     <span style="color: #ffffff; background-color: #000000;"> # chroot /mnt/disk /bin/bash</span>
+
     <span style="color: #ffffff; background-color: #000000;"> # chroot /mnt /bin/bash</span>
  
 
* Then, it remains more to set a new password :
 
* Then, it remains more to set a new password :

Revision as of 21:12, 27 June 2021


This article has been created by an automatic translation software. You can view the article source here.

fr:Comment changer son mot de passe root he:כיצד לשנות את הסיסמה שורש ro:Cum se schimba parola de root ru:Как изменить пароль пользователя root pl:Jak zmienić hasło roota ja:Root のパスワードを変更する方法 ar:كيفية تغيير كلمة السر الجذر zh:如何更改 root 密码 de:Root-Passwort ändern nl:Het root-wachtwoord wijzigen it:Come cambiare la password di root pt:Como alterar a senha de root es:Cómo cambiar la contraseña de root en:How to change root password

Problem

You have lost your root password (Linux) and want to know how to retrieve.

Request to Ikoula

If you're having trouble and want that Ikoula is in charge of the recovery. You can order a one-off intervention of recovery of root password for your Ikoula client interface :

  • Allez sur l'onglet Compte
  • Cliquez sur Acheter plus de services
  • Cliquez sur Interventions ponctuelles
  • Choisissez Reset mot de passe
  • Réglez votre commande dans Compte -> Balance
  • Contactez notre support technique à ikoula@ikoula.com depuis votre adresse de contact technique et indiquez le Server you wish to recover the password

Netboot

Si au contraire vous souhaitez vous en chargez vous-même, sachez qu'il n'est pas possible de le récupérer, il vous faudra le modifier en passant par une session Rescue System aussi nommée NETBOOT.

Netboot Server dedicated physics

We invite you to follow the FAQ Qu’est_ce_que_le_netboot_et_comment_le_lancer_? that will explain how to do this.

Netboot Server dedicated virtual (FLEX)

It depends on the host on which your Server is present. We invite you to follow the FAQ Netboot_sur_serveur flex that will explain how to do this.

The password recovery

Once your Server started by netboot, connect to it in ssh. Access is present by default in the e-mail delivery of your.{Template:Serveur}}. Then you must mount the partitions so that they are accessible. Ex with a standard partitioning (orders will be to adapt to your case) :

  • We first create the destination folder :
     # mkdir /mnt
  • Then we go up the system in this folder :
     # mount /dev/sda3 /mnt

If you have a RAID system, the command is :

     # mount /dev/md1 /mnt
  • Once you have mounted the partitions you must perform a 'root change ' (chroot) in order to simulate being on your system, via the command :
     # chroot /mnt /bin/bash
  • Then, it remains more to set a new password :
    # passwd

This command will ask you to type 2 time on the new password. A first for initialization, the second for confirmation.

  • Finally, exit the chroot and reboot the machine.
     # exit
     # reboot

After reboot, you can log in as root on your machine via the new password that you set.


You are not allowed to post comments.