Google Cloud : Remove account form google-sudoers

6,739

You need to check if you have User Accounts feature setup in your project. If so, you need to remove the user account using your Cloud console or gcloud command. The user accounts created in your project will be propagated to all the VMs with the permissions that you assigned.

Share:
6,739

Related videos on Youtube

Tela
Author by

Tela

Updated on September 18, 2022

Comments

  • Tela
    Tela over 1 year

    I desired to give an access to dev team, so I created 'tempuser' and then cmd to grant ssh connection following

    tempuser@instance-1:~$ gcloud compute ssh tempuser@instance-1
    

    It worked well, but It also added this "tempuser" to google-sudoers group which gave it the full access to all folder as below

    uid=1003(tempuser) gid=1004(tempuser) groups=1004(tempuser),4(adm),30(dip),44(video),46(plugdev),1000(google-sudoers)
    

    After I tried to manually remove tempuser from google-sudoers by this cmd,

    deluser tempuser google-sudoers
    

    it did effect for a short period and then it would automatically be restored 'tempuser' to be a member of google-sudoers again by some script from google I guess.

    As this violate security rule, Could anyone tell me how I can remove user 'tempuser' from google-sudoers

    Thank you very much.

    • Faizan
      Faizan over 7 years
      Were you able to resolve this issue with George's suggestion? If yes, you can post the answer here for other community members who may be seeing this same issue. If not, can you provide more information as to further troubleshooting.