Search code examples
ubuntugoogle-cloud-platformpasswordsvirtual-machineubuntu-20.04

How to regain control over an Ubuntu Remote Desktop running on a Google Cloud VM after being locked out?


Following these instructions I set up a remote desktop computer running on a Google Cloud Virtual Machine. I had a perfectly functional Ubuntu 20.04 LTS machine controllable from my browser. I left it alone for a few minutes, and now the screen is locked:

enter image description here

I have not specified any password before. A simple enter does not let me in.

How can I regain control over this machine?


Solution

  • You can connect to your VM using SSH and then you log in as root using sudo su. Then you can change the password of any user using passwd USER_NAME