Skip to navigation
How to reset your root password on linux with hetzner Rescue system
How to reset your root password The root password of Self-Managed servers can be reset without knowing the previous password by using the Linux Rescue System. Warning: If you don’t have the expertise to perform these tasks, please consult your system administrator. Reset the root password Activate the Linux Rescue System. Mount the installed system (Please substitute the example disk address value below with the correct values for your server): root@jarvis ~ # cd /mnt root@jarvis ~ # mkdir rescue If your server has software raid configured, check the status with the command ‘cat /proc/mdstat’. If it’s not running, you can start it with the command ‘mdadm --examine --scan’. If no software raid is configured (JBOD configuration) or the server has a hardware raid configuration, confirm the name of the disk device with ‘fdisk -l’. It would typically be /dev/sda2. root@jarvis ~ # mount /dev/md2 /mnt/rescue Change root into your installed OS: root@jarvis ~ # chroot /mnt/rescue Run the password command and enter the new password when prompted: root@jarvis ~ # passwd To exit from change root: root@jarvis ~ # exit Reboot the server.
Information Epoch 1558705940
Don't do anything the computer can do for you.
Copyleft ☠ 2019