Reset a password in linux without knowing old password


Steps to reset a password in linux: 

1. Reboot your PC
2. Hold SHIFT key during boot to start GRUB menu
3. Highlight your linux image using up-down arrow keys  e.g. Ubuntu, with Linux 3.19.0-rc1

4. Press 'E' to go into edit mode
5. Find a line starting with linux and append rw init=/bin/bash at the end of that line as shown below
6. Now, Press Ctrl+X to boot, you would see a command line Interface something like below
7. Type in passwd username e.g. passwd raxesh
8. You will be asked to Enter new UNIX password, set your password
9. Type reboot, If that doesn't work, hit ctrl+Alt+Del

You might be thinking that it is a security vulnerability. Actually It is not. Because one should have physical access to the computer to do this. If someone has physical access to your computer then he/she could do far worse than just changing a password.

Comments

Popular posts from this blog

MBR partitioning with 'parted' utility

Disk Partitioning: MBR vs GPT

Replace default splash screen in Yocto