010-100 · Question #5
Which of the following properties of a user account determines whether the user is given administrator privileges?
The correct answer is D. Its user ID is 0 (zero). In Linux, root-level privileges are granted based on user ID (UID) 0, not by username or any other account attribute.
Question
Which of the following properties of a user account determines whether the user is given administrator privileges?
Options
- AIts primary group ID is 0 (zero).
- BIt is listed first in /etc/passwd
- CIts username is root.
- DIts user ID is 0 (zero).
- EIts GECOS (name) field is set to "System Administrator"
How the community answered
(33 responses)- A3% (1)
- B3% (1)
- C15% (5)
- D70% (23)
- E9% (3)
Why each option
In Linux, root-level privileges are granted based on user ID (UID) 0, not by username or any other account attribute.
The primary group ID (GID) 0 grants membership in the root group but does not confer superuser privileges to the account itself.
The order of entries in /etc/passwd has no bearing on privilege level; the kernel does not use file position to determine access rights.
The username 'root' is conventional but not enforced by the kernel; any account with UID 0 has administrator privileges regardless of its name.
The Linux kernel checks the UID of a process to determine privilege level. Any account with UID 0 is treated as root by the kernel, regardless of its username. This means renaming the root account still grants full administrator access as long as UID 0 is assigned.
The GECOS field is an informational comment field only and is never evaluated by the system for access control decisions.
Concept tested: Linux UID 0 and root privilege determination
Source: https://man7.org/linux/man-pages/man5/passwd.5.html
Topics
Community Discussion
No community discussion yet for this question.