Which file contains user account information in Linux?

Study for the RHEL Linux - Red Hat System Administration Exam. Enhance your knowledge with flashcards and multiple-choice questions, complete with hints and explanations. Prepare for your certification!

The file that contains user account information in Linux is located at /etc/passwd. This file is a crucial component of the Linux operating system, as it stores essential information about each user account on the system. Each line in the /etc/passwd file corresponds to a single user account and includes several fields separated by colons. These fields typically contain the username, password placeholder (which is often an 'x' indicating that encrypted passwords are stored in a separate file), user ID (UID), group ID (GID), user information/comment, home directory, and the user's default shell.

The /etc/passwd file is readable by all users, allowing necessary system processes and programs to access user information as needed for authentication and user management purposes. It plays a central role in how Linux handles user accounts and permissions.

In contrast, other files mentioned serve different purposes:

  • /etc/group contains group account information, storing the names and membership of each group on the system.
  • /etc/shadow is where password information is secured, containing encrypted passwords and other account expiration information for user accounts, meant to be read only by the root user.
  • /etc/shells lists the valid login shells available on the system, which can help
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy