If you have lost/forgotten your root password,then here are the steps to change your root password,Just enter the system in the single user mode as given.
To enter in the single user mode,restart the system and select your Linux OS( just take care that you don not press ‘Enter’ as it will boot into you Linux OS). Now press ‘e’ on the kernel line to edit the kernel parameters. Add ‘s’ as the kernel parameters.Press ‘Enter’ to escape from editing:now,press ‘b’ to boot.
You will be drooped on to the root shell.Now,it’s the time to change the password.
You will now be asked for the new password.
If you have forgotten the grub password,then use any Linux Live CD.Go to specific drive that has your Linux/boot and edit the grub.conf file and comment out the password line to remove the password.