ACE-P-ALE1-04 practice question 1 of 35

When using the sudo command to run something as root, which password is required?

Full set: 100 questions
Answer options
A: The user’s password Correct answer
B: The enable password
C: The shadow password
D: The root password
Correct Answer:
A. The user’s password
Explanation

The sudo (superuser do) command allows a permitted user to execute a command as the superuser (root) or another user. By default, to verify that the person executing the command is the authorized user, sudo prompts for the password of the user invoking the command, not the root user's password. This security model grants temporary elevated privileges without distributing the root password, which is a security best practice. The su command, in contrast, typically requires the password of the target user (e.g., root).

Why Incorrect

B. The enable password This is a command used in other network operating systems (like Cisco IOS) to enter a privileged mode and is not applicable to Arista EOS's Linux-based privilege model.
C. The shadow password This refers to the encrypted password hash stored in /etc/shadow. A user never enters this directly; they provide their plaintext password for authentication.
D. The root password This is required by the su command to switch to the root user. The primary purpose of sudo is to avoid the need to share the root password.

References

1. Arista EOS Central - Getting Started with EOS: "EOS is built on an unmodified Linux kernel, and as such, you have the full power of a Linux system at your disposal." This establishes that standard Linux command behavior, such as that of sudo, applies. (Source: Arista Networks, EOS Central, "Getting Started with EOS" article).

2. MIT - The Missing Semester of Your CS Education: "To execute a command as another user (e.g. the root user), you can use sudo. It will prompt you for your password and then execute the command as the specified user." (Source: MIT, "The Missing Semester of Your CS Education", Lecture 2: Shell Tools and Scripting, Section on "Becoming another user").

3. Sudo Project - Sudo Manual: The official manual for the sudo command states: "When a user executes sudo and authenticates, they are prompted for their personal password." (Source: Sudo Project, sudo(8) man page, "AUTHENTICATION" section).

Scroll to Top