Skip to content

Instantly share code, notes, and snippets.

Last active March 14, 2023 08:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Reset Ubuntu Root Password from Openstack Console (VNC)


I get a case that I have to log in to an instance on Openstack without going through the instance IP (because it can't be reached) so I have to try to enter from the console for troubleshooting in the OS. Here's one of my ways to log in using the root user on Ubuntu Server 20.04 LTS running on top of Openstack.

Goes to VNC

  • Goes to Horizon -> Project -> Instance -> Click on your Instance -> Console.
  • If you doesn't have access to Horizon, you can use virsh console but will not shows in here.


  • Click on SendCtrlAltDel
  • while rebooting from the beginning immediately press esc repeatedly until it enters the boot order menu
  • when the boot order window opens, please press e
  • Find linux /boot/vmlinuz-xxxxxxxx
  • Replace ro quiet with rw init=/bin/bash
  • Remove console=ttyS0
  • Press CTRL + X

Change Password

  • when you enter root@(none):/# do passwd
    • root@(none):/#
    • root@(none):/# passwd
  • Then reboot with exec /sbin/init
    • root@(none):/# exec /sbin/init


For CentOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment