We have to follow 8 steps to crack root password without using any external media
- Step-1 : Reboot the system and interrupt the boot loader countdown timer by pressing any key except enter.
- Step-2 : Find the entry that is normally booted, and change it to halt execution during the initial ram disk.
- 2.1. Use the cursor keys to highlight the entry that is normally booted and press e
- 2.2. Use the cursor to move to the line that has the kernel and kernel arguments. This line normally starts with
linux16 or linuxefi.
- 2.3. Move the cursor to the end of line by pressing End, and add rd.break.
- 2.4. Press Ctrl+x to boot using the modified stanza and you will get a command line interface.
- Step-3: On command line Interface you have to write command
# mount -o remount,rw /sysroot
Here we are mounting the system read-write . The file system is mounted under /sysroot.
- Step-4 : Change the working root to /sysroot directory.
# chroot /sysroot
- Step-5 : Now you can change password
- Step-6 : Now make sure that all the unlabeled files(like /etc/shadow) get relabeled during boot so run the command
- Step-7 : Now by running command exit you can exit from interactive shell.
- Step-8 : Now again run exit command by which you can exit from command line interface and booting process will start again with new root password.
- How to reset the root password of RedHat/CentOS Linux
- How to Change Root Password in Kali Linux?
- Internal and External Commands in Linux
- Reset a lost Linux administrative password and Explanation
- Kali Linux - Password Cracking Tool
- Wi-Fi Password of All Connected Networks in Windows/Linux
- Privacy and Security in online social media
- Futuristic Solution to Privacy and Security in online social media
- How to get the subtitles for Videos in VLC Media Player?
- Difference Between Social Media Marketing and Digital Marketing
- 5 Effective Ways of Using Social Media for Brand Building
- Linux Virtualization : Linux Containers (lxc)
- Difference Between Arch Linux and Kali Linux
- How to test all Linux distributions without downloading them?
- How to setup Proxychains in Linux without any Errors?
- Generating Password and OTP in Java
- Node JS | Password Hashing with Crypto module
- Create a password generator using shell scripting
- Tips For Choosing a Strong Password
- Graphical Password Authentication
This article is contributed by Kshitij. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.