Reset Linux Root Password

You forgot your root user password and can not log in anymore?

We'll show you how to reset the password for your root user.

Start method 1 / bin / bash

  1. Start the PC / Server and press at the operating system selection ESCto cancel the boot process
  2. Now select the desired operating system and press the key & #8222; e & #8220 ;.
  3. You will now see the start parameters. Find the line with linux respectively. kernel starts and places the cursor at the end of this line.
  4. Add the following parameter.
    rw init = / bin / bash
  5. Now start with CTRL + X the system and wait until the command line appears. If you have completed all steps correctly, the system should be available without user name and password.
  6. The file system is now read-only integrated. Bind this now writable (rw) with this command:
    mount -n -o remount, rw / /
  7. Sit down now

    the new password.

  8. Now set the file system to read-only so that it is safely in a consistent state before the reboot:
    mount -n -o remount, ro //
  9. Start the system with
    reboot -f

    New. The forced reboot (-f option) is required, since without init daemon a normal reboot is not possible.

Method 2 Start single user mode

One possibility is the Single user mode, The system is started in runlevel S1. This method works especially at older Linux distributions (For newer Linux distributions, entering the current root password is required for Single User Mode & #8211, so this method will not work).

A Linux computer with GRUB bootloader is started in single user mode with the following steps:

  1. in GRUB with the help of [Arrow keys] select the desired boot entry (which is usually the one that is automatically preselected)
  2. button [E] Press to edit the entry
  3. [Arrow keys] use to select the kernel line (kernel)
  4. button [E] Press to edit the kernel line
  5. at the end of this line the word single complete (separated by a space in front of the previous parameter)
  6. [Esc] Press to go to the parent menu
  7. button [E] Press to boot the just changed entry
  8. When starting in single user mode you automatically get to a root shell. A new root password can be used with the command passwd be set.
de_DEDeutsch en_USEnglish
Scroll to Top