Reset Root Password

 
This is for when you need to reset the root password. There is no security without physical security. So if you can access the console at load time all you need to do is enter a boot parameter. (This was even easier in the past, but newer kernels require a little more work)

For kernel 2.6

If you are using the GRUB bootloader:

  • single init=/bin/sh (add this as the boot parameter)
  • mount / -n -o remount,rw
  • passwd
  • mount / -n -o remount,ro
  • /sbin/reboot

Comments