010-100 · Question #7
When a new user is added, where does his user ID gets stored?
The correct answer is E. /etc/passwd. User account information, including the UID, is stored in /etc/passwd, which is the standard flat-file user database on Linux/Unix systems.
Question
When a new user is added, where does his user ID gets stored?
Options
- A/etc/users
- B/etc/realm
- C/etc/pass
- D/etc/shpasswd
- E/etc/passwd
How the community answered
(33 responses)- A6% (2)
- B3% (1)
- C15% (5)
- D3% (1)
- E73% (24)
Why each option
User account information, including the UID, is stored in /etc/passwd, which is the standard flat-file user database on Linux/Unix systems.
/etc/users does not exist as a standard file on Linux or Unix systems.
/etc/realm is not a standard Linux file; it is unrelated to user account storage.
/etc/pass is not a valid or standard system file on Linux.
/etc/shpasswd is not a standard file; the shadow password file is /etc/shadow, which stores hashed passwords but not the UID.
/etc/passwd is a colon-delimited file where each line represents one user account; the third field on each line contains that user's UID. All standard Linux utilities (login, ls, ps) consult this file to resolve user identities.
Concept tested: Linux /etc/passwd user account storage
Source: https://man7.org/linux/man-pages/man5/passwd.5.html
Topics
Community Discussion
No community discussion yet for this question.