This topic is about how to change/reset root password. No, this post will not able to reveal a existing root password. And of course, like all human being, it arrives sometimes that we always forget something somehow, somewhere….but when it comes to root password /user password in Linux, yes it is possible to reset it AND NO unable to reveal it with the method provided below. There is big difference between changing it and knowing it.
Almost all Linux distro password salted that mean : a random input is added at end of the password before hashing. So it is very difficult to know the password and even doing the brute force attack (of course it depends how complex is your password) Compare, to Windows, you can simply use a rainbow table to know the password or doing the brute force attack. But again, depend how long is your password.
If you want to learn more salt password Linux, visit wiki Salt
Now back to the subject,
1. First of all make sure, you have physically access to the machine
2. After boot the OS and wait for the grub screen
3. Press <ESC> when you’re prompted.
4. Highlight the rescue mode and press <e>. If there is not pick the kernel line where OS installed
For Debian.. Ubuntu.. Backtrack … example :
5. After, add follwing command at the end of the line : rw init=/bin/bash
6. After press, Ctrl + x to boot.
7. Change password for root by typing the command : passwd root
8. Reboot the machine : reboot
For Centos, Fedora… example
After choose the kernel line and presss <e>
Select the kernel line that you just modify and press <b> to boot
Change root password or desire user password, by typing the command : passwd <username>
And finally reboot the machine : reboot
Disclaimer: All work shared in this post is property of IT Secure Net