- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Resetting a Root Password in Linux without External Media
Discuss how to recover the root password of Linux without using any external media. The version of Linux we are working with is CentOS version 8.2. Still, the procedures we will see can work with any Linux distro and many others. You may find that it doesn’t work with some Debian-based distro.
To do this exercise, you should have the following requisites Prerequisites −
Willingness to work in the Linux command line environment.
Physical access to the Linux server(it cannot do this across a network).
Procedures to follow to change the root password
Restart the computer and interrupt the boot process at the grub screen by pressing the shift key, just a caution on this you’ve got to be ready to move fast when this happens, as you will see when you will practically do it.
Highlight the normal boot entry or OS-name entry and press e to open grub parameters.
Using arrow keys, move down to the line starting with “ Linux /boot/vmlinuz, “ where you need to replace “ro quiet splash $vt_handoff” with “rw init=/bin/bash.”
Pressing CTRL + X will restart the system with changes just made. It will start the system and take you directly to the root shell.
Now type this command to change the password of the root.
$ passwd root
If you are getting the message “ password updated successfully, “ That’s it. The password of the root user has been changed.
Now restart your system by typing this command.
This method works with almost all Linux-based systems. In case if this method doesn’t work, you can try booting from bootable media.
In this tutorial, we discussed recovering root passwords by interrupting grub and changing startup configuration. We do not need any external media in this method, But you should have physical access to the system. If this method doesn’t work, then you have to use a bootable drive.
- Changed SAP password not working while resetting using BAPI
- Reset Kali Linux Password
- Accessing The Unix/Linux password database (pwd)
- How to reset or change the MySQL root password?
- Reset the root user password on rhel7 xcentos7 x
- How to execute an external program like windows media player in Java?
- How To Setup SSH Access Without Password
- getpass() and getuser() in Python (Password without echo)
- Resetting a customized Perspective in SAP HANA Studio
- Getting root permissions on a file inside of vi on Linux
- How to Show Asterisks While Typing Sudo Password in Linux?
- How to install python modules without root access?