When one door closes, the other opens. We have another way to login to system.
There are various methods available for resetting a root password. The list includes booting into a single-user mode, booting using boot disk and edit the password file and mounting the drive on another computer and editing the password file.
In this post, I will list a simple yet useful method only. Others require a little more knowledge of OS-related operations and it may prove dangerous if you perform in a wrong way.
Reseting password by booting into single-user mode
This is the easiest and the fastest method to reset passwords. The steps are a little different depending on if you are using GRUB or LILO as a bootmanager.
For LILO
0) Reboot the system. When you see the LILO: prompt (see Fig. below), type in linux single and press 'Enter'. This will log you in as root in single-user mode. If your system requires you to enter your root password to log in, then try linux init=/bin/bash instead.
1) Once the system finishes booting, you will be logged in as root in single-user mode. Use passwd and choose a new password for root.
2) Type reboot to reboot the system and then you can login with the new password you just selected.
If you have a new version of LILO which gives you a menu selection of the various kernels available press Tab to get the LILO: prompt and then proceed as shown above.
For GRUB
0) Reboot the system, and when you are at the selection prompt (See Fig. below), highlight the line for Linux and press 'e'. You may only have 2 seconds to do this, so be quick.
1) This will take you to another screen where you should select the entry that begins with 'kernel' and press 'e' again.
2) Append ' single' to the end of that line (without the quotes). Make sure that there is a space between what's there and 'single'. If your system requires you to enter your root password to log into single-user mode, then append init=/bin/bash after 'single'. Hit 'Enter' to save the changes.
3) Press 'b' to boot into Single User Mode.
4) Once the system finishes booting, you will be logged in as root. Use passwd and choose a new password for root.
5) Type reboot to reboot the system, and you can login with the new password you just selected.
* Disclaimer *
Use the information in this document at your own risk. I completely deny any potential liability for the contents of this document. Use of the concepts, examples, and/or other content of this document is entirely at your own risk.
The information in this document should only be used to recover passwords from machines to which you have legal access. If you use this information to break into other people's systems, then I am not responsible for it and you deserve your fate when you are caught. So don't blame me.
You are strongly advised to make a backup of your system before performing any of the actions listed in this document.
0 comments:
Post a Comment