Key takeaways:

  1. Press and Hold Shift at VM Ubuntu server start up,i.e. send ctrl+alt+delete to reboot from VM menu

  2. Press e and edit Ubuntu Grub script

  3. image.png

  4. At the end of the last line that starts with linux, append "rw init /bin/bash"

  5. Press F10/ Ctrl+X to reboot 

  6. After entering passwordless console, use "passwd root" to reset root password

  7. use "exec /sbin/init" to reboot

  8. next time when logging in, press and hold shift again, and see the line, previous appended text has gone, just normally log in with new password





refs:

https://linux.how2shout.com/how-to-reset-ubuntu-22-04-lts-root-password/


没有登录不能评论