Courseiva
Essential CommandsmediumMultiple ChoiceObjective-mapped

LFCS Essential Commands Practice Question

Network Topology
-rw-rrRefer to the exhibit.docker:x:1001:1001::/home/docker:/bin/bashdba:x:1002:1002::/home/dba:/bin/false$ ls -la /home/dba/total 8$ whoamidba

A user 'dba' tries to login via SSH and fails. Based on the exhibit, what is the most likely cause?

⚠ Common exam trap

Many candidates assume SSH login failures are always due to authentication (password/key) or file permissions, but the LFCS exam frequently tests the subtle point that an invalid login shell causes a successful authentication followed by an immediate session termination, which appears as a login failure.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The user 'dba' has an invalid login shell.

The exhibit shows that the user 'dba' has an invalid login shell (e.g., /sbin/nologin or /bin/false). When the login shell is set to a non-interactive shell, SSH authentication succeeds but the session immediately closes, preventing the user from logging in. This is a common configuration for system accounts or users who should not have interactive shell access.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The file /home/dba/file.txt is corrupt.

    Why it's wrong here

    Unrelated to login.

  • The user 'dba' has an invalid login shell.

    Why this is correct

    /bin/false prevents login.

  • The user 'dba' is not in the 'docker' group.

    Why it's wrong here

    Group membership not relevant for SSH login.

  • The home directory /home/dba does not have correct permissions.

    Why it's wrong here

    Permissions are 755, which is acceptable.

About these practice questions

Courseiva writes every LFCS question from scratch — 507 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.