Announcements
The Google Cloud Community will be in read-only from July 16 - July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error creating user when starting up a container

I'm trying to start up a container on a compute VM, running a Ruby on Dails Docker image. I haven't succeeded yet.

As it spins up, I get the following error in my logs:

{
"insertId": "1rtukjkf4oh1jr",
"jsonPayload": {
"message": "Error creating user: useradd: invalid user name '272753671180-compute@developer.gserviceaccount.com': use --badname to ignore.",
"localTimestamp": "2023-07-26T16:46:48.3703Z",
"omitempty": null
},
"resource": {
"type": "gce_instance",
"labels": {
"zone": "europe-west2-c",
"project_id": "sodium-woodland-389013",
"instance_id": "3600874612426863370"
}
},
"timestamp": "2023-07-26T16:46:48.370463992Z",
"severity": "ERROR",
"labels": {
"instance_name": "omnivore-demo-2"
},
"logName": "projects/sodium-woodland-389013/logs/GCEGuestAgent",
"sourceLocation": {
"file": "non_windows_accounts.go",
"line": "144",
"function": "main.(*accountsMgr).set"
},
"receiveTimestamp": "2023-07-26T16:46:48.857619465Z"
}

So far as I can understand, it never even gets as far as running my image.
Is this the host VM that's going to run the container?
How do I fix it?

Thanks,
Guy

2 2 750
2 REPLIES 2

Willbin
Former Googler

Hello @that_guy_guy,

Welcome to Google Cloud Community!

If the username you are trying to create does not conflict with an existing user or system account in the container's base image, you could just add --badname as a flag in your useradd. See if it works.

Thanks

Thanks Willbin.
How would I do that?

I'm not explicitly calling useradd and I don't think I've specified that name anywhere. This is all stuff that Google's container runner is doing under the covers.