010-150 · Question #43
When a new user is added, where does the user ID get stored?
The correct answer is E. /etc/passwd. User account information, including the numeric user ID (UID), is stored in /etc/passwd on Linux and Unix-like systems.
Question
When a new user is added, where does the user ID get stored?
Options
- A/etc/users
- B/etc/realm
- C/etc/pass
- D/etc/shpasswd
- E/etc/passwd
How the community answered
(29 responses)- A3% (1)
- B14% (4)
- C7% (2)
- D3% (1)
- E72% (21)
Why each option
User account information, including the numeric user ID (UID), is stored in /etc/passwd on Linux and Unix-like systems.
/etc/users is not a standard file on Linux or Unix systems and does not exist by default.
/etc/realm is not a standard user database file; it has no defined role in Linux user management.
/etc/pass is not a valid system file; the correct filename is /etc/passwd.
/etc/shpasswd is not a standard file; shadow passwords are stored in /etc/shadow, not /etc/shpasswd.
The /etc/passwd file is the standard system database for user accounts; each line contains seven colon-delimited fields including the username, UID, primary GID, home directory, and login shell. When useradd or adduser creates a new account, the assigned UID is written to this file.
Concept tested: Linux user account storage in /etc/passwd
Source: https://man7.org/linux/man-pages/man5/passwd.5.html
Topics
Community Discussion
No community discussion yet for this question.