CompTIA Linux+ Practice Questions

CompTIA Linux+ (XK0-006) exam preparation

CompTIA Linux+ practice questions in English: 180 questions with explanations. The mock exam has 90 questions and 90 minutes.

CompTIA Linux+ free question 5 / 10 · Domain 3: Security

In a service file under /etc/pam.d/, an auth line uses the control keyword sufficient for a module that is listed above several other modules. The module succeeds, and no earlier required module has failed. What does the pam.d manual page say the PAM framework does?

  1. It continues with the next module, as the requisite keyword is the one that ends the stack early
  2. It returns success to the application and skips the remaining modules of the stack
  3. It runs the remaining modules of the stack and returns failure if one of them fails
  4. It ignores the success of the module, which counts when it is the single module of its type
Show the answer and explanation

Answer: B

Why this is correct
The pam.d page lists the simple control keywords required, requisite, sufficient and optional. For sufficient, it says that when the module succeeds and no prior required module has failed, the framework returns success without calling any further modules in the stack. A failure of a sufficient module is ignored and the stack continues.

Why the other options are wrong
"It runs the remaining modules of the stack and returns failure if one of them fails" … The page describes this behavior for required: a failure of such a module leads to a failure result only after the remaining stacked modules have been invoked. It is not what the page says for sufficient.
"It ignores the success of the module, which counts when it is the single module of its type" … The page describes this behavior for optional: its success or failure is important only if it is the only module in the stack for that service and type. A sufficient module that succeeds ends the stack.
"It continues with the next module, as the requisite keyword is the one that ends the stack early" … The page describes requisite as returning control directly to the application when the module fails. That concerns a failure, and the page says that a success of a sufficient module returns success at once.

Key points
sufficient ends the stack on success, requisite ends it on failure, required fails only after the remaining modules have run, and optional matters only if it is alone.

Go to the CompTIA Linux+ practice app (10 free questions; purchase unlocks all questions)

See the full practice set