What file contains user group memberships in Linux?

Prepare for the LPIC-2 Certification Test with our study tools, including flashcards and multiple choice questions with hints and explanations. Get ready to pass your exam!

The file that contains user group memberships in Linux is /etc/group. This file is specifically designed to store details about the groups available on the system and associates each group with its members. Each line in this file represents a single group and includes the group name, password placeholder (if applicable), group ID (GID), and a comma-separated list of usernames that are members of that group.

In contrast, /etc/passwd contains information about user accounts, such as the username, user ID (UID), and home directory, but does not directly list group memberships. The /etc/sudoers file is used to define user privileges and restrictions regarding the use of the sudo command, while /etc/shadow stores user password information and account expiration details, which are also unrelated to user group memberships. Therefore, understanding that /etc/group is the designated file for managing and displaying user group memberships is fundamental to Linux system administration.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy