Which file lists users who are allowed to use sudo - CompTIA Linux + XK0-005

Question

Which file lists users who are allowed to use sudo?
 

Answers
  1. correct
Explanation

Correct Answer: b. /etc/sudoers

The /etc/sudoers file is the primary configuration file that determines which users and groups have permission to execute commands with sudo privileges. It defines access policies, command permissions, and privilege escalation rules. 

Proper editing of this file is crucial and should be done using visudo to avoid syntax errors that could lock administrators out of sudo access, thereby preventing accidental misconfiguration of critical system permissions.

why the other options are incorrect:

  • a. /etc/shadow: This file stores encrypted user password hashes and account expiration data. It does not define sudo privileges and cannot be used to control user access to administrative commands.
  • c. /etc/groups: While this file lists group memberships, including the sudo or wheel group (depending on the system), it doesn't itself assign sudo privileges. It must be used in conjunction with /etc/sudoers to enable group-based sudo access.
  • d. /etc/passwd: This file contains user account information such as usernames, UIDs, home directories, and default shells. It does not control sudo access or define administrative privileges.

Related Courses

Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.

a prepsaret exam featured image
CompTIA Prep

220-1201 - CompTIA A+ Exam Core 1

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

220-1202 - CompTIA A+ Exam Core 2

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA SecurityX CAS-005

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud Essentials+ CLO-002

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Network+ N10-009

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Security+ SY0-701

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Data + DA0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Pentest+

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA CySA+ CSO-003

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA DataSys+ DS0-001

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Tech+ FC0-U71

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Cloud+ CV0-004

Start Course Prep
a prepsaret exam featured image
CompTIA Prep

CompTIA Server+ SK0-005

Start Course Prep

Easy way to pass your test within a week with prepsaret

You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams

View Courses Offered