Can Two Users Have Same Uid in Linux?
Contents

From The Linux Programming Interface, about /etc/passwd : It is possible (but unusual) to have more than one record in the password file with the same user ID, thus permitting multiple login names for the same user ID. This allows multiple users to access the same resources (e.g., files) using different passwords.

Can two users have same UID?

Do not assign the same UID to multiple user IDs because the sharing of UIDs allows each user to access all of the resources associated with the other users of that shared user ID. … However, you might want to assign the same UID to multiple user IDs if these user IDs are used by the same person or persons.

What is a multiple UID?

The UID is what the system uses instead of the username. The username is a convenience. You can use groups and acls to allow multiple users to access files & directories. There is also su and sudo which allows a user to assume the identify of another, knowing that users password. 1 members found this post helpful.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest