Google Cloud Compute Engine CentOS 7 Sudo command

Till Friday 12/10/2018 I was able to run sudo commands (Ex:sudo mongodump --db iot_ac). Today When I tried to run any command as root(sudo),i get the below message(Connected through SSH):

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

  1. Respect the privacy of others.

  2. Think before you type.

  3. With great power comes great responsibility.

[sudo] password for platformcloudtest:

Also not sure where I can find the password also, Please Help.

Answer

It seems that a change (maybe an update) happened and user is longer part of the “Google-sudoers” group

This workaround helped me to solve the issue :

1.Adde a new user in IAM & admin page with Role Compute Admin , Owner

2.Once logged in just changed the the username from the Terminal Options->Change Linux Username

3.Enter the command sudo -i

4.run sudo commands without any issues.

find
more information: Please visit the issue-tracker thread of Google Cloud Platform

Attribution
Source : Link , Question Author : Prem Sanil , Answer Author : Community

Leave a Comment