Difference between revisions of "How to change root password"

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽
 
(3 intermediate revisions by one other user not shown)
Line 14: Line 14:
 
<span data-link_translate_es_title="Cómo cambiar la contraseña de root"  data-link_translate_es_url="C%C3%B3mo+cambiar+la+contrase%C3%B1a+de+root"></span>[[:es:Cómo cambiar la contraseña de root]][[es:Cómo cambiar la contraseña de root]]
 
<span data-link_translate_es_title="Cómo cambiar la contraseña de root"  data-link_translate_es_url="C%C3%B3mo+cambiar+la+contrase%C3%B1a+de+root"></span>[[:es:Cómo cambiar la contraseña de root]][[es:Cómo cambiar la contraseña de root]]
 
<span data-link_translate_en_title="How to change root password"  data-link_translate_en_url="How+to+change+root+password"></span>[[:en:How to change root password]][[en:How to change root password]]
 
<span data-link_translate_en_title="How to change root password"  data-link_translate_en_url="How+to+change+root+password"></span>[[:en:How to change root password]][[en:How to change root password]]
 +
 
{{#seo:
 
{{#seo:
 
|title=How to change root password
 
|title=How to change root password
Line 22: Line 23:
 
|image_alt=Wiki Logo
 
|image_alt=Wiki Logo
 
}}
 
}}
 +
 
==Problem==
 
==Problem==
 
You have lost your '''''root password''''' (Linux) and want to know how to retrieve.
 
You have lost your '''''root password''''' (Linux) and want to know how to retrieve.
Line 50: Line 52:
  
 
* 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>
 +
<br>
 +
* IN UBUNTU/Debian if the installation is done with LVM :<BR/>
 +
<span style="color: #ffffff; background-color: #000000;">#  lvscan </span><br>
 +
<span> => ACTIVE            '/dev/VolGroup00/root' [929.51 GiB] inherit  (the message in return gives you the area to be mounted)<span><br/>
 +
 
 +
<span style="color: #ffffff; background-color: #000000;"> #  mount /dev/VolGroup00/root /mnt/
 +
 
 +
In case the partition is inactive, please run the following command to activate this LVM partition (to be adapted according to the path of the partition).
 +
 
 +
<span style="color: #ffffff; background-color: #000000;">#  lvchange -a y /dev/VolGroup00/root</span><br>
  
 +
Your root is now available.
 +
<br>
 +
<br>
 
* 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 :

Latest revision as of 10:15, 27 September 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


  • IN UBUNTU/Debian if the installation is done with LVM :

# lvscan
=> ACTIVE '/dev/VolGroup00/root' [929.51 GiB] inherit (the message in return gives you the area to be mounted)

# mount /dev/VolGroup00/root /mnt/

In case the partition is inactive, please run the following command to activate this LVM partition (to be adapted according to the path of the partition).

# lvchange -a y /dev/VolGroup00/root

Your root is now available.

  • 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.