I have seen many of my office Linux machines connected to some domain.

I am wondering as if a machine maintains the list of UID of users in a domain, locally? If yes, then how and who does it? if not then can there be a possibility that a local user and a domain user may have same UID?

For example:

Suppose I have a linux machine connected to a domain say "abc" and I have a user in the domain say "xyz" which has a uid say '1234', Now my question is if I create a local user using adduser, lets say "lmn". Is there a possibility that user "lmn" and "abc" can have same UID? or is it genius of the operating system that it always gives a different UID or someone has to maintain it for the operating system?

  • I am wondering is there any kind of mapping for the UID of users in the domain to the UID in local database - What local database are you referring to?
    – joeqwerty
    Mar 25, 2015 at 19:20
  • your question isn't clear, you should rewrite it or else it'll get closed
    – alexus
    Mar 25, 2015 at 19:23
  • By local database I mean the local users in the machine. Mar 25, 2015 at 19:23

1 Answer 1


If a machine is configured to look to LDAP or Active Directory for user information, local user management commands such as "useradd" will pick up on the existence of any duplicate uid/uidnumber entries in the domain and refuse to create the account. It does not store all domain user information locally (though it may cache it).

Duplicate entries can be created by editing the relevant local files (/etc/passwd & /etc/shadow) or by temporarily disabling lookups to LDAP/AD. This is rarely a good idea.

Is that what you were looking for?

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.