What does Linux use to track user and group identities?
Numeric attributes stored in /etc/passwd for users and /etc/group for groups.
Why are these attributes important?
They are used for file ownership, permissions, and access control.
What are the four core attributes?
UID, GID, EUID, EGID.
What is UID?
Unique integer identifying each user account.
Where is UID stored?
/etc/passwd.
What does UID do?
Every file created by the user is stamped with this UID and used during permission checks.
Why is UID alignment important?
For shared storage across systems (e.g., NFS).
What is GID?
Identifies the user’s primary group.
Where is GID stored?
/etc/group.
What does GID do?
Assigns group permissions for shared access and enables collaborative file access.
Example of GID usage?
GID 2000 for group ‘developers’ allows shared write access.
What is EUID?
Effective User ID, a temporary identity used when running set-uid (SUID) programs.
How does EUID work?
Program runs with the UID of the file owner, not the user.
Example of EUID usage?
/usr/bin/passwd runs with root’s EUID.
Why is EUID important?
Allows privilege escalation for specific tasks while maintaining least privilege.
What is EGID?
Effective Group ID, a temporary group identity used when running set-gid (SGID) programs.
How does EGID work?
Program or file runs with the group ID of the file; files in SGID directories inherit the directory’s group.
Example of EGID usage?
chmod g+s <filename> sets SGID on a file.</filename>
Why use EGID?
Enables temporary group access without permanently adding users to the group.