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
- Start the PC / Server and press at the operating system selection ESCto cancel the boot process
- Now select the desired operating system and press the key & #8222; e & #8220 ;.
- 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.
- Add the following parameter.
rw init = / bin / bash
- 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.
- The file system is now read-only integrated. Bind this now writable (rw) with this command:
mount -n -o remount, rw / /
- Sit down now
the new password.
- 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 //
- Start the system with
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:
- in GRUB with the help of [Arrow keys] select the desired boot entry (which is usually the one that is automatically preselected)
- button [E] Press to edit the entry
- [Arrow keys] use to select the kernel line (kernel)
- button [E] Press to edit the kernel line
- at the end of this line the word single complete (separated by a space in front of the previous parameter)
- [Esc] Press to go to the parent menu
- button [E] Press to boot the just changed entry
- 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.