Explanation: The files /etc/passwd and /etc/group are the source of the information in the following output:
uid=1000 (bob) gid=1000 (bob) groups=1000 (bob), 10 (wheel), 150 (docker), 1001 (libvirt) (wireshark), 989
The /etc/passwd file contains information about user accounts, such as the username, password, user ID (UID), group ID (GID), full name, home directory, and login shell1. The /etc/group file contains information about groups, such as the group name, password, group ID (GID), and members2.
The output shows the UID, GID, and group membership of the user bob. The UID and GID of bob are 1000, which can be found in the /etc/passwd file. The groups that bob belongs to are bob, wheel, docker, libvirt, wireshark, and 989, which can be found in the /etc/group file. The group names are shown in parentheses after the GID, except for the last group, which has no name.
The other options are not files that store user and group information in Linux. The /etc/id file does not exist by default. The /home/index file is not a standard file and has no relation to user and group information. The /var/db/users file is not a standard file and has no relation to user and group information. References:
- Linux Essentials Exam Objectives, Version 1.6, Topic 103.1, Weight 2
- Linux Essentials Certification Guide, Chapter 3, Page 51-52
- Linux Filesystem Hierarchy, Chapter 3, Page 17-18
- Linux Users and Groups, Chapter 2, Page 9-10