logoalt Hacker News

vbezhenartoday at 6:53 AM1 replyview on HN

Not really. You can have separate users with separate $HOME, separate passwords, separate groups, separate everything.

User is user. Uid is uid. It's not the same. Uid is used for file permissions, that's true.


Replies

ButlerianJihadtoday at 7:23 AM

If you try and set up "separate users" with "separate $HOME" that map to the same UID, all those "users" will "own" all those same files, and all processes started by one another. They would be able to kill processes, delete/modify/add files, impersonate one another. Because they are the same user.

You would be unable to enforce quotas or privacy for any of them. Whatever they did on the system would be indistinguishable, because their process UIDs would be identical. Any files they created would be owned the same. Sure, set them up with unique lists of GIDs; it really doesn't matter in the end.

I have no idea what you mean "User is user", but you are right: UID is not the same as a username. The username exists only in the passwd(5) database, and not in the kernel, like at all. The kernel has no idea what usernames are, and that's why they're irrelevant to user administration.