Change the password of root if forgot // Single User Mode without root password

Change the password of root if forgot // Single User  Mode without root password for Maintenance

This method will get you past the "Give root password for maintenance" message, but the environment will be much more primitive, but this should be enough for you to issue a 'passwd' command to change the password for root. If you want to do more than that then you may have to mount filesystems and manually start the network.
1.   Reboot your machine; press 'Esc' to get to the GRUB menu; select your image; press 'e' to edit; select the Kernel line.
2.   Press 'e' to edit the kernel line. Edit the line to get rid of quiet and splash; change 'ro' to 'rw'; and add 'init=/bin/bash'.
kernel /vmlinuz-2.6.15-27-386 root=/dev/mapper/Ubuntu-root rw init=/bin/bash
3.   Press 'enter' then 'b' to boot with these new settings.
4.   Change the password ..using passwd command  .

Boot into Single User Mode

1.   GRUB: Boot your Linux box and start hitting 'Esc' until you get the GRUB menu. The GRUB menu passes by quickly. This can be a pain over VMWare so you might have to reboot a few times before you catch it. LILO: If you are using LILO without no delay set to pause for the boot prompt then the process is similar, except that you press and hold any of the following keys: Shift, Alt, Ctrl, ScrollLock, or CapsLock.
2.   Select a boot image from the menu then press 'e' to edit.
3.   Select the Kernel line and press 'e' to edit. 
kernel /vmlinuz-2.6.15-27-386 root=/dev/mapper/Ubuntu-root ro quiet splash
Edit that line to get rid of quiet and splash and add 'single':
kernel /vmlinuz-2.6.15-27-386 root=/dev/mapper/Ubuntu-root ro single
Then press enter. You will be returned to the menu.
4.   Press 'b' to boot with these new settings.
5.   If if appears to boot normally, but you see a message that says:
Give root password for maintenance (or type Control-D to continue):</div>

comments powered by Disqus