- Reboot the box
- Hold down the shift button upon starting up so you get into the grub menu
- Press the "e" key to edit the first option in the menu
- Append "break=init" to the end of the line that contains the linux boot parameters
- Press F10 to boot using the edited grub script
- You should now be prompted with the initramfs user handle
- The partition that was mentioned in the grub menu is mounted, but in a readonly state
- /bin/mount -o remount,rw /
- passwd user
- exit
- exit
- You can now reboot normally and login as the user with the password you just changed
Sunday, March 29, 2015
Change forgotten password in linux using initramfs
If you have been encountered with a linux box and you can't remember the password or just desperately need to get into the box, here is an easy way of doing so without using any external tools.
Subscribe to:
Post Comments (Atom)
Great post! jio local html
ReplyDelete