This could be total nonsense but as I am new and am trying to learn. I came across this question. 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 hope now it's clear and may sound more stupid.

Please bare with me :)

Thanks, Prince

  • 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 '15 at 19:20
  • your question isn't clear, you should rewrite it or else it'll get closed – alexus Mar 25 '15 at 19:23
  • By local database I mean the local users in the machine. – LearningNinja Mar 25 '15 at 19:23

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.