nerdexam
LPI

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.

Security and File Permissions

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)
  • A
    3% (1)
  • B
    14% (4)
  • C
    7% (2)
  • D
    3% (1)
  • E
    72% (21)

Why each option

User account information, including the numeric user ID (UID), is stored in /etc/passwd on Linux and Unix-like systems.

A/etc/users

/etc/users is not a standard file on Linux or Unix systems and does not exist by default.

B/etc/realm

/etc/realm is not a standard user database file; it has no defined role in Linux user management.

C/etc/pass

/etc/pass is not a valid system file; the correct filename is /etc/passwd.

D/etc/shpasswd

/etc/shpasswd is not a standard file; shadow passwords are stored in /etc/shadow, not /etc/shpasswd.

E/etc/passwdCorrect

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

#/etc/passwd#user ID#user accounts#system files

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice