LFCS practice question 8 of 35

Which of the following fields can be found in the /etc/group file? (Choose THREE correct answers.)

Full set: 260 questions
Answer options
A: The list of users that belong to the group. Correct answer
B: The home directory of the group.
C: The name of the group. Correct answer
D: The description of the group.
E: The password of the group. Correct answer
Correct Answer:
A. The list of users that belong to the group.; C. The name of the group.; E. The password of the group.
Explanation

The /etc/group file stores essential information about user groups. Each line represents one group and contains four colon-separated fields. The standard format is groupname:password:GID:userlist. Therefore, the file contains the group's name (field 1), an encrypted password or a placeholder 'x' (field 2), and a comma-separated list of users who are members of the group (field 4). The group's password is often stored in /etc/gshadow instead, but the field for it exists in /etc/group.

Why Incorrect

B. The /etc/group file format does not include a field for a group home directory.
D. There is no dedicated field for a group description in the /etc/group file. This type of metadata (GECOS) is associated with users in /etc/passwd.

References

- group(5) manual page. "Each line of the file describes a single group in the following format: groupname:password:GID:userlist".

- Red Hat Enterprise Linux 9 Documentation, "Managing local users and groups", Section 10.1.2. "Local group definitions". This section explicitly describes the four fields of the /etc/group file.

- The Linux Programming Interface, Michael Kerrisk, Chapter 8, "Users and Groups", Section 8.2, "The Group File: /etc/group", p. 156. This section details the structure and fields of the /etc/group file.

Scroll to Top