When creating a new compute engine using the Debian 9.0 image there is a default user created with my full email address. This user has no primary group associated with it.

How do I setup this user so that it has a valid primary group on creation?

If I type 'id' on my user I get the following;

uid=53928310(foo_gmail_com) gid=53928310 groups=53928310

The GID 53928310 doesn't exist in the /etc/group file I have to

sudo addgroup --gid 53928310 foo_gmail_com

Also the user doesn't exist in the /etc/passwd file, should it?

  • The user should exist in the /etc/passwd file which should list the uid and username, primary group gid and group name and secondary groups this user belongs to. foo_gmail_com should be the user name that’s related to the account you used to log in to GCP. How are you creating the VM Instances, via the GCP Console or gcloud command line? Have you tried creating other VMs to check whether same issue takes place? – JMD Jun 4 '18 at 10:52

I can see the user ID and group ID is showing the output of ID command, as such the user and group ID should exist in the /etc/passwd.

The issue seems to be a transient error with user creation. In order to work around this issue, you can ssh from the browser and change the user. By so doing it will generate another user and add it to right group i.e same as username.

Steps to change the user from ssh from the browser are documented here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.