I cannot login in my google cloud vm using gcloud cli, but I found a work around here: ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]
So I created a new user as the post said, logged in my vm successfully with that user. Now I want to switch to root user - So I Use su -
, but it requires a password, which i don't have. How can i switch to root?
Asked
Active
Viewed 387 times
0

Jason Wang
- 3
- 1
-
To switch to the root user without entering a password `sudo bash`. – John Hanley Feb 23 '20 at 16:55
1 Answers
1
I had the same problem.
The answer is surprisingly easy, just use sudo passwd
and it will allow you set a new password without current one.

Cherishh
- 36
- 3