Hi, my company recently created an organization in GCP. I and several other people in my company have had at this time a customer account. The company didn't migrate our account but instead created managed accounts with the same names (email addresses). I have deleted the previous customer account, other people didn't, but all of us have similar problem - when we use OS Login to login into compute instances in our project we get:
ERROR: (gcloud.compute.ssh) FAILED_PRECONDITION: The specified username or UID is not unique within given system ID.
We have tried to delete "posixAccounts" settings from those users through DirectoryAPI and we have tried to assign different "posixAccounts" settings to those users with no success. I have seen that the same issue several years ago required manual intervention on the part of Google. Is it still the case? Is there any insights toward how to resolve this issue?
Hello @yegor_yegorov,
Welcome to Google Cloud Community!
This error occurs when OS Login tries to generate a username that already exists within an organization. This is common when a user account is deleted and a new user with the same email address is created shortly after. After a user account is deleted, it takes up to 48 hours to remove the user's POSIX information.
You can resolve this by:
Yeah, I actually have waited for more than 48 hours to see whereas the issue would resolve, but it didn't. What actually resulved this issue is deleting the customer account and removing "PosixAccounts" setting from the organization account. After several hours the issue was resolved.