Ubuntu 12.04 resetting root access

  • Reboot
  • hold SHIFT
  • select your inage on Grub menu
  • press "e" to edit
  • in the line starting with "linux" add int=/bin/bash to the very end
  • ctrl+x to reboot
  • your system will boot to passwordless root shell
  • mount -o remount,rw / (make your partition writable)
  • some people do: chmod 640 /etc/shadow file other just copy: cp /etc/shadow- /etc/shadow to eliminate it from th game
  • analyze what you have by: less /etc/passwd
  • determine what needs to be changed by: passwd USER