corrupt /etc/sudoers ,forgotten root password and now ?

Author: stephan  |  Category: Linux


Der Fall kann so schnell passieren. Sudoers ohne visudo editiert , Fehler gemacht und schon kann man nicht mehr root werden .
Ein Workaround:
Beim Booten kann man dem Kernel eine Zusätzliche Option mitgeben
init=/bin/bash
Dann bootet das System in eine passwordlose root-shell.

Beim Grub kann man mit e in das Menü zum Editieren kommen und mit b danach wieder booten.

It can happen so fast- edited /etc/suders without visudo , made a mistake and no root-login was possible.
Some workaround:
You can pass an additinal option to the kernel while booting
init=/bin/bash
With the option the system launches a passwordless rootshell

Within Grub you can edit den menu with e and with b you can boot the computer

Tags: , , , ,