I am trying to create a directory in root in a VM that is running in the Google Cloud. This requires sudo access. I've tried multiple ways of doing so, but to no avail. The documentation on the Google website states that all I have to do is to grant myself the role of "Compute Admin" from the IAM page, restart the VM and then issue the command "sudo passwd". This should prompt me for a change of password. But, after granting myself the required role, "sudo passwd" does not prompt for a new password. It requests the original password (which, if I had, I wouldn't have to do this). I've tried granting myself various other Admin roles, but with similar failed results.
Asked
Active
Viewed 8 times