Introduction – In many systems, User has to enter root password to enter in to “single user mode“. On Ubuntu/Debian system, you have to enter root password while entering into single user mode.
What to do if you loss or forgot root password ?
method(1) Use bootable CD – This is the last options to reset root password on your system. Infact if you have set GRUB password and you have loss root as well as GRUB password then only you need to go for this method. Otherwise go with second method…
method(2) Single user mode and bypass root password – You can reset root password even if your system require root password to enter in to single user mode. GRUB will help you to bypass , and will not ask you for root password.
This is as simple editing the preferred boot line in your GRUB boot loader menu at boot time…
Original Line –
/vmlinuz-2.6.22-14-generic root=/dev/sda5 ro quiet splash
Modify as –
/vmlinuz-2.6.22-14-generic root=/dev/sda5 ro quiet splash single init=/bin/bash